• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 12.0.1.79
GDCredentialsProfile.h
Go to the documentation of this file.
1 /*
2  * Copyright 2023 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 
122 struct GD_C_API GDCredentialsProfile {
134  char* id;
135 
142 
158  char* type;
159 
165  char* name;
166 
171  bool required;
172 
186 };
187 
193 typedef enum {
197 
201 
208 
216 
220 
224 
228 
229 } GD_C_API GDCredentialsProfileType;
230 
238 GD_C_API GDCredentialsProfileType GDCredentialsProfile_type(const char* profileId);
239 
249 struct GD_C_API GDCredentialsProfileEvent {
257 };
258 
287 typedef void (*GDCredentialsProfileEventCb)(const struct GDCredentialsProfileEvent event, void* appData);
288 
316 GD_C_API void GDCredentialsProfile_register(GDCredentialsProfileEventCb cb, void* appData);
317 
345 
358 
408 GD_C_API bool GDCredentialsProfile_list(size_t* profileCount,
409  struct GDCredentialsProfile** profiles,
410  struct GDError* error);
411 
421 GD_C_API int GDCredentialsProfile_days_until_expiry(const char* profileId);
422 
432 GD_C_API int GDCredentialsProfile_days_until_renewal_due(const char* profileId);
433 
443 GD_C_API void GDCredentialsProfile_begin_enrolment(const char* profileId);
444 
455 
467 
477 
487 GD_C_API void GDCredentialsProfile_free(struct GDCredentialsProfile* profiles,
488  size_t profileCount);
489 
502 GD_C_API void GDCredentialsProfile_unregister(void);
503 
515 
521 #ifdef __cplusplus
522 }
523 #endif
524 
525 #endif
GDCredentialsProfile::name
char * name
Display name.
Definition: GDCredentialsProfile.h:165
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:185
GDCredentialsProfileStateImportNow
@ GDCredentialsProfileStateImportNow
Another application has requested credentials.
Definition: GDCredentialsProfile.h:65
GDCredentialsProfile::state
GDCredentialsProfileState state
Current or latest state.
Definition: GDCredentialsProfile.h:141
GDCredentialsProfileType
GDCredentialsProfileType
User Credential profile type.
Definition: GDCredentialsProfile.h:193
GDCredentialsProfile_type
GDCredentialsProfileType GDCredentialsProfile_type(const char *profileId)
Return the profile type.
GDCredentialsProfileTypeUnknown
@ GDCredentialsProfileTypeUnknown
Unkown User Credential profile type.
Definition: GDCredentialsProfile.h:196
GDCredentialsProfile::id
char * id
Identifier.
Definition: GDCredentialsProfile.h:134
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:227
GDCredentialsProfile
User Credential profile.
Definition: GDCredentialsProfile.h:122
GDCredentialsProfileTypeDeviceKeystore
@ GDCredentialsProfileTypeDeviceKeystore
Device User Credential profile.
Definition: GDCredentialsProfile.h:207
GDCredentialsProfileTypeAssistedSCEP
@ GDCredentialsProfileTypeAssistedSCEP
Assisted SCEP User Credential profile.
Definition: GDCredentialsProfile.h:219
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:256
GDCredentialsProfileEvent
User Credential profile event.
Definition: GDCredentialsProfile.h:249
GDCredentialsProfileTypeUserCertificate
@ GDCredentialsProfileTypeUserCertificate
User Certificate profile.
Definition: GDCredentialsProfile.h:215
GDCredentialsProfileTypeEntrust
@ GDCredentialsProfileTypeEntrust
Entrust User Credential profile.
Definition: GDCredentialsProfile.h:223
GDCredentialsProfileEventCb
void(* GDCredentialsProfileEventCb)(const struct GDCredentialsProfileEvent event, void *appData)
Type for User Credential profile callback implementation.
Definition: GDCredentialsProfile.h:287
GDCredentialsProfile_can_reset_type
bool GDCredentialsProfile_can_reset_type(GDCredentialsProfileType type)
Determine whether a User Credential profile of a specific type can be reset.
GDCredentialsProfile::required
bool required
Required flag.
Definition: GDCredentialsProfile.h:171
GDError
Error structure.
Definition: GDCommon.h:114
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:200
GDCredentialsProfile_is_type_registered
bool GDCredentialsProfile_is_type_registered(GDCredentialsProfileType type)
Check if registered for a User Credential profile type.
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:158
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.