Wasabi ExpressPlay SDK for Embedded Systems  1.23.0
EmbErrorCodes.h
Go to the documentation of this file.
1 /*****************************************************************
2 |
3 | EMB Error Codes
4 |
5 | $Id: EmbErrorCodes.h 2017-09-20
6 | Original author: Kiran Kumar G
7 |
8 | This software is provided to you pursuant to your agreement
9 | with Intertrust Technologies Corporation ("Intertrust").
10 | This software may be used only in accordance with the terms
11 | of the agreement.
12 |
13 | Copyright (c) 2017-2018 by Intertrust. All rights reserved.
14 |
15 ****************************************************************/
21 #ifndef _EMB_ERROR_CODES_H_
22 #define _EMB_ERROR_CODES_H_
23 
24 /*----------------------------------------------------------------------
25 | constants
26 +---------------------------------------------------------------------*/
27 #define EMB_SUCCESS (0)
28 #define EMB_FAILURE (-1)
29 #define EMB_FAILED(result) ((result) != EMB_SUCCESS)
30 #define EMB_SUCCEEDED(result) ((result) == EMB_SUCCESS)
31 
32 /*----------------------------------------------------------------------
33 | macros
34 +---------------------------------------------------------------------*/
35 #define EMM_CHECK_POINTER_SEVERE(_p) do { \
36  if ((_p) == NULL) { \
37  NPT_CHECK_SEVERE(EMB_ERROR_OUT_OF_MEMORY); \
38  } \
39 } while(0)
40 #define EMM_CHECK_POINTER_LABEL_SEVERE(_p, _result, _label) do { \
41  if ((_p) == NULL) { \
42  _result = EMB_ERROR_OUT_OF_MEMORY; \
43  NPT_CHECK_LABEL_SEVERE(_result, _label); \
44  } \
45 } while(0)
46 
47 /* general error codes */
48 #ifndef EMB_ERROR_BASE
49 #define EMB_ERROR_BASE (-111000)
50 #endif
51 
52 #define EMB_ERROR_UNKNOWN (EMB_ERROR_BASE - 0)
53 #define EMB_ERROR_UNSUPPORTED_VERSION (EMB_ERROR_BASE - 1)
54 #define EMB_ERROR_INVALID_PAYLOAD_TYPE (EMB_ERROR_BASE - 2)
55 #define EMB_ERROR_BASE64_DECODE (EMB_ERROR_BASE - 3)
56 #define EMB_ERROR_DECOMPRESSION (EMB_ERROR_BASE - 4)
57 #define EMB_ERROR_OCTOPUS_NODE_ID (EMB_ERROR_BASE - 5)
58 #define EMB_ERROR_PACKET_PARSE (EMB_ERROR_BASE - 6)
59 #define EMB_ERROR_OUT_OF_MEMORY (EMB_ERROR_BASE - 7)
60 #define EMB_ERROR_ADD_LICENSE (EMB_ERROR_BASE - 8)
61 #define EMB_ERROR_SUSHI_DB_PATH (EMB_ERROR_BASE - 9)
62 #define EMB_ERROR_SQLITE (EMB_ERROR_BASE - 10)
63 #define EMB_ERROR_DEL_STORE (EMB_ERROR_BASE - 11)
64 #define EMB_ERROR_DB_INSERT (EMB_ERROR_BASE - 12)
65 #define EMB_ERROR_DB_UPDATE (EMB_ERROR_BASE - 13)
66 #define EMB_ERROR_DB_DELETE (EMB_ERROR_BASE - 14)
67 #define EMB_ERROR_DB_CORRUPTED (EMB_ERROR_BASE - 15)
68 #define EMB_ERROR_DB_PATH_NOT_EXISTS (EMB_ERROR_BASE - 16)
69 #define EMB_ERROR_INVALID_LICENSE_DATA (EMB_ERROR_BASE - 17)
70 #define EMB_ERROR_STORAGE_OPEN (EMB_ERROR_BASE - 18)
71 #define EMB_ERROR_INVALID_PARAMETERS (EMB_ERROR_BASE - 19)
72 #define EMB_ERROR_STORAGE_NO_ITEM (EMB_ERROR_BASE - 20)
73 #define EMB_ERROR_STORAGE_LOOKUP (EMB_ERROR_BASE - 21)
74 #define EMB_ERROR_INVALID_PAYLOAD (EMB_ERROR_BASE - 22)
75 #define EMB_ERROR_INVALID_TARGET_ADDR (EMB_ERROR_BASE - 23)
76 #define EMB_ERROR_MULTIPLE_CIDS (EMB_ERROR_BASE - 24)
77 #define EMB_ERROR_INITIALIZATION (EMB_ERROR_BASE - 25)
78 #define EMB_ERROR_TARGET_MISMATCH (EMB_ERROR_BASE - 26)
79 #define EMB_ERROR_ITEM_NOT_FOUND_OR_EXPIRED (EMB_ERROR_BASE - 27)
80 #define EMB_ERROR_STORAGE_REMOVE_ITEM (EMB_ERROR_BASE - 28)
81 #define EMB_ERROR_ES_OWNING_THREAD (EMB_ERROR_BASE - 29)
82 #define EMB_ERROR_OBJECT_UPDATE (EMB_ERROR_BASE - 30)
83 #define EMB_ERROR_ITEM_WITH_WRONG_TYPE (EMB_ERROR_BASE - 31)
84 #define EMB_ERROR_STATE_SUSPENDED (EMB_ERROR_BASE - 32)
85 #define EMB_ERROR_STATE_REVOKED (EMB_ERROR_BASE - 33)
86 #define EMB_ERROR_INVALID_GROUP_MASK (EMB_ERROR_BASE - 34)
87 
88 // gko related errors
89 #define EMB_ERROR_BASE_GKO (EMB_ERROR_BASE - 2000)
90 #define EMB_ERROR_GKO_INSERT (EMB_ERROR_BASE_GKO - 0)
91 #define EMB_ERROR_GKO_EXPIRED (EMB_ERROR_BASE_GKO - 1)
92 #define EMB_ERROR_INVALID_GKO_DATA (EMB_ERROR_BASE_GKO - 2)
93 #define EMB_ERROR_INVALID_GKO_ID (EMB_ERROR_BASE_GKO - 3)
94 
95 // epl related errors
96 #define EMB_ERROR_BASE_EPL (EMB_ERROR_BASE - 3000)
97 #define EMB_ERROR_EPL_INSERT (EMB_ERROR_BASE_EPL - 0)
98 #define EMB_ERROR_EPL_NO_GKO_ID (EMB_ERROR_BASE_EPL - 1)
99 #define EMB_ERROR_EPL_EXPIRED (EMB_ERROR_BASE_EPL - 2)
100 #define EMB_ERROR_INVALID_EPL_DATA (EMB_ERROR_BASE_EPL - 3)
101 
102 // transactionId related errors
103 #define EMB_ERROR_BASE_TID (EMB_ERROR_BASE - 4000)
104 #define EMB_ERROR_DUPLICATE_TID (EMB_ERROR_BASE_TID - 0)
105 
106 // mbb related errors
107 #define EMB_ERROR_BASE_MBB (EMB_ERROR_BASE - 5000)
108 #define EMB_ERROR_NO_SAS_FOR_MBB (EMB_ERROR_BASE_MBB - 0)
109 
110 // epd related error
111 #define EMB_ERROR_BASE_EPD (EMB_ERROR_BASE - 6000)
112 #define EMB_ERROR_PACKAGE_INSERT (EMB_ERROR_BASE_EPD - 0)
113 #define EMB_ERROR_LCID_INSERT (EMB_ERROR_BASE_EPD - 1)
114 #define EMB_ERROR_CIDH_INSERT (EMB_ERROR_BASE_EPD - 2)
115 #define EMB_ERROR_PACKAGE_REMOVE (EMB_ERROR_BASE_EPD - 3)
116 #define EMB_ERROR_PACKAGE_CONSTRAINT (EMB_ERROR_BASE_EPD - 4)
117 #endif //_EMB_ERROR_CODES_H