• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 10.2.0.83
GDCredentialsProfile.h
Go to the documentation of this file.
1 /*
2  * (c) 2018 BlackBerry Limited. All rights reserved.
3  */
4 
5 #ifndef GD_CREDENTIALS_PROFILE_H
6 #define GD_CREDENTIALS_PROFILE_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 #include "GDCommon.h"
21 
22 struct GDError;
23 
34 typedef enum {
50 
66 
71 
80 
99 
109 } GD_C_API GDCredentialsProfileState;
110 
120 struct GD_C_API GDCredentialsProfile {
132  char* id;
133 
140 
156  char* type;
157 
163  char* name;
164 
169  bool required;
170 
184 };
185 
191 typedef enum {
195 
199 
206 
214 
218 
222 
226 
227 } GD_C_API GDCredentialsProfileType;
228 
236 GD_C_API GDCredentialsProfileType GDCredentialsProfile_type(const char* profileId);
237 
245 struct GD_C_API GDCredentialsProfileEvent {
253 };
254 
283 typedef void (*GDCredentialsProfileEventCb)(const struct GDCredentialsProfileEvent event, void* appData);
284 
312 GD_C_API void GDCredentialsProfile_register(GDCredentialsProfileEventCb cb, void* appData);
313 
341 
391 GD_C_API bool GDCredentialsProfile_list(size_t* profileCount,
392  struct GDCredentialsProfile** profiles,
393  struct GDError* error);
394 
404 GD_C_API int GDCredentialsProfile_days_until_expiry(const char* profileId);
405 
415 GD_C_API int GDCredentialsProfile_days_until_renewal_due(const char* profileId);
416 
426 GD_C_API void GDCredentialsProfile_begin_enrolment(const char* profileId);
427 
438 
448 
458 GD_C_API void GDCredentialsProfile_free(struct GDCredentialsProfile* profiles,
459  size_t profileCount);
460 
473 GD_C_API void GDCredentialsProfile_unregister(void);
474 
486 
492 #ifdef __cplusplus
493 }
494 #endif
495 
496 #endif
GDCredentialsProfile::name
char * name
Display name.
Definition: GDCredentialsProfile.h:163
GDCredentialsProfile_reset_type
void GDCredentialsProfile_reset_type(GDCredentialsProfileType type)
Reset all the User Credential profiles of the same type.
GDCredentialsProfile::providerSettings
char * providerSettings
Additional settings from the credential provider.
Definition: GDCredentialsProfile.h:183
GDCredentialsProfileStateImportNow
@ GDCredentialsProfileStateImportNow
Another application has requested credentials.
Definition: GDCredentialsProfile.h:65
GDCredentialsProfile::state
GDCredentialsProfileState state
Current or latest state.
Definition: GDCredentialsProfile.h:139
GDCredentialsProfileType
GDCredentialsProfileType
User Credential profile type.
Definition: GDCredentialsProfile.h:191
GDCredentialsProfile_type
GDCredentialsProfileType GDCredentialsProfile_type(const char *profileId)
Return the profile type.
GDCredentialsProfileTypeUnknown
@ GDCredentialsProfileTypeUnknown
Unkown User Credential profile type.
Definition: GDCredentialsProfile.h:194
GDCredentialsProfile::id
char * id
Identifier.
Definition: GDCredentialsProfile.h:132
GDCommon.h
GDCredentialsProfile_unregister
void GDCredentialsProfile_unregister(void)
Unregister from notification of app-based User Credential profile state changes.
GDCredentialsProfile_begin_enrolment
void GDCredentialsProfile_begin_enrolment(const char *profileId)
Begin enrolment for a User Credential profile.
GDCredentialsProfile_free
void GDCredentialsProfile_free(struct GDCredentialsProfile *profiles, size_t profileCount)
Free a returned profiles buffer.
GDCredentialsProfileState
GDCredentialsProfileState
User Credential profile states.
Definition: GDCredentialsProfile.h:34
GDCredentialsProfileTypePKIConnector
@ GDCredentialsProfileTypePKIConnector
PKI Connector User Credential profile.
Definition: GDCredentialsProfile.h:225
GDCredentialsProfile
User Credential profile.
Definition: GDCredentialsProfile.h:120
GDCredentialsProfileTypeDeviceKeystore
@ GDCredentialsProfileTypeDeviceKeystore
Device User Credential profile.
Definition: GDCredentialsProfile.h:205
GDCredentialsProfileTypeAssistedSCEP
@ GDCredentialsProfileTypeAssistedSCEP
Assisted SCEP User Credential profile.
Definition: GDCredentialsProfile.h:217
GDCredentialsProfile_days_until_expiry
int GDCredentialsProfile_days_until_expiry(const char *profileId)
Days until the next credential expires.
GDCredentialsProfileStateRenewalDue
@ GDCredentialsProfileStateRenewalDue
Credentials will soon expire.
Definition: GDCredentialsProfile.h:98
GDCredentialsProfile_register
void GDCredentialsProfile_register(GDCredentialsProfileEventCb cb, void *appData)
Register for notification of User Credential profile state changes.
GDCredentialsProfile_days_until_renewal_due
int GDCredentialsProfile_days_until_renewal_due(const char *profileId)
Days until the next credential is due to be renewed.
GDCredentialsProfile_list
bool GDCredentialsProfile_list(size_t *profileCount, struct GDCredentialsProfile **profiles, struct GDError *error)
List User Credential profiles.
GDCredentialsProfileEvent::profile
struct GDCredentialsProfile * profile
Profile that has changed state.
Definition: GDCredentialsProfile.h:252
GDCredentialsProfileEvent
User Credential profile event.
Definition: GDCredentialsProfile.h:245
GDCredentialsProfileTypeUserCertificate
@ GDCredentialsProfileTypeUserCertificate
User Certificate profile.
Definition: GDCredentialsProfile.h:213
GDCredentialsProfileTypeEntrust
@ GDCredentialsProfileTypeEntrust
Entrust User Credential profile.
Definition: GDCredentialsProfile.h:221
GDCredentialsProfileEventCb
void(* GDCredentialsProfileEventCb)(const struct GDCredentialsProfileEvent event, void *appData)
Type for User Credential profile callback implementation.
Definition: GDCredentialsProfile.h:283
GDCredentialsProfile::required
bool required
Required flag.
Definition: GDCredentialsProfile.h:169
GDError
Error structure.
Definition: GDCommon.h:112
GDCredentialsProfileStateImportDue
@ GDCredentialsProfileStateImportDue
Setup of credentials is required.
Definition: GDCredentialsProfile.h:49
GDCredentialsProfile_register_type
void GDCredentialsProfile_register_type(GDCredentialsProfileType type, GDCredentialsProfileEventCb cb, void *appData)
Register User Credential profile.
GDCredentialsProfileStateDeleted
@ GDCredentialsProfileStateDeleted
Profile removed.
Definition: GDCredentialsProfile.h:108
GDCredentialsProfileTypeAppbased
@ GDCredentialsProfileTypeAppbased
App-based User Credential profile.
Definition: GDCredentialsProfile.h:198
GDCredentialsProfileStateImported
@ GDCredentialsProfileStateImported
All credentials have been setup.
Definition: GDCredentialsProfile.h:70
GDCredentialsProfileStateModified
@ GDCredentialsProfileStateModified
The profile has been modified since credentials were setup.
Definition: GDCredentialsProfile.h:79
GDCredentialsProfile::type
char * type
Profile type (reserved for future use).
Definition: GDCredentialsProfile.h:156
GDCredentialsProfile_begin_enrolment_type
void GDCredentialsProfile_begin_enrolment_type(GDCredentialsProfileType type)
Begin enrolment for all User Credential profiles of the same type.
GDCredentialsProfile_unregister_type
void GDCredentialsProfile_unregister_type(GDCredentialsProfileType type)
Unregister from notification of User Credential profile state changes.