Add license file
[platform/upstream/csf-framework.git] / framework / TSCErrorCodes.h
1 /*
2     Copyright (c) 2014, McAfee, Inc.
3     
4     All rights reserved.
5     
6     Redistribution and use in source and binary forms, with or without modification,
7     are permitted provided that the following conditions are met:
8     
9     Redistributions of source code must retain the above copyright notice, this list
10     of conditions and the following disclaimer.
11     
12     Redistributions in binary form must reproduce the above copyright notice, this
13     list of conditions and the following disclaimer in the documentation and/or other
14     materials provided with the distribution.
15     
16     Neither the name of McAfee, Inc. nor the names of its contributors may be used
17     to endorse or promote products derived from this software without specific prior
18     written permission.
19     
20     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21     ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22     WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23     IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
24     INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
25     BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27     LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
28     OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
29     OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32 #ifndef TSCERRORCODES_H
33 #define TSCERRORCODES_H
34
35 #ifdef __cplusplus 
36 extern "C" {
37 #endif
38 /**
39  * \file TSCErrorCodes.h
40  * \brief TSC Error Code Header File
41  *  
42  * This file provides the TSC error code definition.
43  */
44
45 #define TSC_ERROR_MODULE_GENERIC 1 /* A generic error code. */
46 #define ERR_NAME_MODULE_GENERIC "Generic"
47 #define ERR_DESC_MODULE_GENERIC "A generic error."
48
49 #define TSC_ERROR_CANCELLED 1 /* Operation cancelled. */
50 #define ERR_NAME_CANCELLED "Cancelled"
51 #define ERR_DESC_CANCELLED "Operation cancelled."
52
53 #define TSC_ERROR_DATA_ACCESS 2 /* Unable to access data. */
54 #define ERR_NAME_DATA_ACCESS "DataAccess"
55 #define ERR_DESC_DATA_ACCESS "Unable to access data."
56
57 #define TSC_ERROR_INVALID_PARAM 3 /* Invalid parameter. */
58 #define ERR_NAME_INVALID_PARAM "InvalidParam"
59 #define ERR_DESC_INVALID_PARAM "Invalid parameter."
60
61 #define TSC_ERROR_INSUFFICIENT_RES 4 /* Insufficient resource. */
62 #define ERR_NAME_INSUFFICIENT_RES "InsufficientRes"
63 #define ERR_DESC_INSUFFICIENT_RES "Insufficient resource."
64
65 #define TSC_ERROR_INTERNAL 5 /* Unexpected internal error. */
66 #define ERR_NAME_INTERNAL "Internal"
67 #define ERR_DESC_INTERNAL "Unexpected internal error."
68
69 #define TSC_ERROR_INVALID_HANDLE 6 /* Invalid handle. */
70 #define ERR_NAME_INVALID_HANDLE "InvalidHandle"
71 #define ERR_DESC_INVALID_HANDLE "Invalid handle."
72
73 #define TSC_ERROR_NOT_IMPLEMENTED 7 /* Specified method is not implemented by the Channel server. */
74 #define ERR_NAME_NOT_IMPLEMENTED "NotImplemented"
75 #define ERR_DESC_NOT_IMPLEMENTED "Specified method is not implemented."
76
77 #define TSC_ERROR_REMOVE_METHOD_NOT_FOUND -1
78 #define TSC_ERROR_ADD_METHOD_FAILED -1
79
80 #ifdef __cplusplus
81 }
82 #endif 
83
84 #endif /* TSCERRORCODES_H */