• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 12.0.1.79
GDCommon.h
Go to the documentation of this file.
1 /*
2  * Copyright 2023 BlackBerry Limited. All rights reserved.
3  */
4 
5 #ifndef GD_COMMON_H
6 #define GD_COMMON_H
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 #ifndef GD_C_API
13 # if !defined(_WIN32)
14 # define GD_C_API __attribute__((visibility("default")))
15 # else
16 # define GD_C_API
17 # endif
18 #endif
19 
20 #ifndef GD_C_API_EXT
21 # define GD_C_API_EXT
22 #endif
23 
24 #include <stdint.h>
25 #include <stddef.h>
26 
33 GD_C_API extern const int32_t GDSuccess;
34 
41 GD_C_API extern const int32_t GDErrorOutOfMemory;
42 
49 GD_C_API extern const int32_t GDErrorNotAuthorized;
50 
57 GD_C_API extern const int32_t GDErrorNotFound;
58 
67 GD_C_API extern const int32_t GDErrorNotMapped;
68 
75 GD_C_API extern const int32_t GDErrorWrongPassword;
76 
83 GD_C_API extern const int32_t GDErrorGeneral;
84 
91 GD_C_API extern const int32_t GDErrorInvalidArgument;
92 
103 GD_C_API extern const int32_t GDErrorNotAllowed;
104 
114 struct GD_C_API GDError {
115 
119  int32_t code;
120 
124  const char* description;
125 };
126 
140 struct GD_C_API GDData {
142  void* data;
143 
145  size_t size;
146 
148  const char* type;
149 };
150 
151 #ifdef __cplusplus
152 }
153 #endif
154 
155 #endif
GDErrorNotAllowed
const int32_t GDErrorNotAllowed
Not allowed.
GDError::code
int32_t code
Numeric code for the error, always one of the GDError constants defined in this header file.
Definition: GDCommon.h:119
GDErrorNotFound
const int32_t GDErrorNotFound
Not found.
GDError::description
const char * description
Error message that is suitable to display to the end user, at least for diagnostic purposes.
Definition: GDCommon.h:124
GDData::size
size_t size
Size of the data.
Definition: GDCommon.h:145
GDSuccess
const int32_t GDSuccess
Success.
GDData::type
const char * type
Indication of the type of data in this encapsulation.
Definition: GDCommon.h:148
GDErrorGeneral
const int32_t GDErrorGeneral
General error.
GDErrorNotMapped
const int32_t GDErrorNotMapped
Not mapped to a User Credential Profile.
GDData
Data encapsulation structure.
Definition: GDCommon.h:140
GDData::data
void * data
Binary data.
Definition: GDCommon.h:142
GDError
Error structure.
Definition: GDCommon.h:114
GDErrorWrongPassword
const int32_t GDErrorWrongPassword
Wrong password.
GDErrorNotAuthorized
const int32_t GDErrorNotAuthorized
Not authorized.
GDErrorOutOfMemory
const int32_t GDErrorOutOfMemory
Out of memory.
GDErrorInvalidArgument
const int32_t GDErrorInvalidArgument
Invalid argument.