Public API Interface for User construction. More...
Go to the source code of this file.
Functions | |
struct LDUser * | LDUserNew (const char *const key) |
Allocate a new empty user Object. More... | |
void | LDUserFree (struct LDUser *const user) |
Destroy an existing user object. More... | |
void | LDUserSetAnonymous (struct LDUser *const user, const LDBoolean anon) |
Mark the user as anonymous. More... | |
LDBoolean | LDUserSetIP (struct LDUser *const user, const char *const ip) |
Set the user's IP. More... | |
LDBoolean | LDUserSetFirstName (struct LDUser *const user, const char *const firstName) |
Set the user's first name. More... | |
LDBoolean | LDUserSetLastName (struct LDUser *const user, const char *const lastName) |
Set the user's last name. More... | |
LDBoolean | LDUserSetEmail (struct LDUser *const user, const char *const email) |
Set the user's email. More... | |
LDBoolean | LDUserSetName (struct LDUser *const user, const char *const name) |
Set the user's name. More... | |
LDBoolean | LDUserSetAvatar (struct LDUser *const user, const char *const avatar) |
Set the user's avatar. More... | |
LDBoolean | LDUserSetCountry (struct LDUser *const user, const char *const country) |
Set the user's country. More... | |
LDBoolean | LDUserSetSecondary (struct LDUser *const user, const char *const secondary) |
Set the user's secondary key. More... | |
void | LDUserSetCustom (struct LDUser *const user, struct LDJSON *const custom) |
Set the user's custom JSON. More... | |
LDBoolean | LDUserAddPrivateAttribute (struct LDUser *const user, const char *const attribute) |
Mark an attribute as private. More... | |
void | LDUserSetPrivateAttributes (struct LDUser *const user, struct LDJSON *const privateAttributes) |
Mark a set of attributes as private. More... | |
void | LDUserSetCustomAttributesJSON (struct LDUser *const user, struct LDJSON *const custom) |
Set the user's custom field. More... | |
Public API Interface for User construction.
LDBoolean LDUserAddPrivateAttribute | ( | struct LDUser *const | user, |
const char *const | attribute | ||
) |
Mark an attribute as private.
[in] | user | The user to mutate. May not be NULL . |
[in] | attribute | Attribute to mark as private. May not be NULL . |
void LDUserFree | ( | struct LDUser *const | user | ) |
Destroy an existing user object.
[in] | user | The user free. May be NULL . |
struct LDUser* LDUserNew | ( | const char *const | key | ) |
Allocate a new empty user Object.
[in] | key | A string that identifies the user. For c-server-sdk this value may not be NULL. For c-client-sdk if a NULL key is provided the SDK will use a persistent platform identifier. If a identifier cannot be determined a non persistent fallback will be generated. |
NULL
on failure. void LDUserSetAnonymous | ( | struct LDUser *const | user, |
const LDBoolean | anon | ||
) |
Mark the user as anonymous.
[in] | user | The user to mutate. May not be NULL . |
[in] | anon | If the user should be anonymous or not. |
LDBoolean LDUserSetAvatar | ( | struct LDUser *const | user, |
const char *const | avatar | ||
) |
Set the user's avatar.
[in] | user | The user to mutate. May not be NULL . |
[in] | avatar | The user's avatar. May be NULL . |
LDBoolean LDUserSetCountry | ( | struct LDUser *const | user, |
const char *const | country | ||
) |
Set the user's country.
[in] | user | The user to mutate. May not be NULL . |
[in] | country | The user's country. May be NULL . |
void LDUserSetCustom | ( | struct LDUser *const | user, |
struct LDJSON *const | custom | ||
) |
Set the user's custom JSON.
[in] | user | The user to mutate. May not be NULL . |
[in] | custom | Custom JSON for the user. May be NULL . |
void LDUserSetCustomAttributesJSON | ( | struct LDUser *const | user, |
struct LDJSON *const | custom | ||
) |
Set the user's custom field.
LDUserSetCustom
. LDBoolean LDUserSetEmail | ( | struct LDUser *const | user, |
const char *const | |||
) |
Set the user's email.
[in] | user | The user to mutate. May not be NULL . |
[in] | The user's email. May be NULL . |
LDBoolean LDUserSetFirstName | ( | struct LDUser *const | user, |
const char *const | firstName | ||
) |
Set the user's first name.
[in] | user | The user to mutate. May not be NULL . |
[in] | firstName | The user's first name. May be NULL . |
LDBoolean LDUserSetIP | ( | struct LDUser *const | user, |
const char *const | ip | ||
) |
Set the user's IP.
[in] | user | The user to mutate. May not be NULL . |
[in] | ip | The user's IP. May be NULL . |
LDBoolean LDUserSetLastName | ( | struct LDUser *const | user, |
const char *const | lastName | ||
) |
Set the user's last name.
[in] | user | The user to mutate. May not be NULL . |
[in] | lastName | The user's last name. May be NULL . |
LDBoolean LDUserSetName | ( | struct LDUser *const | user, |
const char *const | name | ||
) |
Set the user's name.
[in] | user | The user to mutate. May not be NULL . |
[in] | name | The user's name. May be NULL . |
void LDUserSetPrivateAttributes | ( | struct LDUser *const | user, |
struct LDJSON *const | privateAttributes | ||
) |
Mark a set of attributes as private.
[in] | user | The user to mutate. May not be NULL . |
[in] | attribute | The set of attributes to mark as private. Must be an array of strings. May not be NULL . |
LDBoolean LDUserSetSecondary | ( | struct LDUser *const | user, |
const char *const | secondary | ||
) |
Set the user's secondary key.
[in] | user | The user to mutate. May not be NULL . |
[in] | secondary | The user's secondary key. May be NULL . |