Grassroots Infrastructure
The Grassroots Infrastructure is a suite of computing tools to help users and developers use scientific data infrastructure that can easily be interconnected.
|
Go to the documentation of this file.
22 #ifndef USER_DETAILS_H
23 #define USER_DETAILS_H
25 #include "bson/bson.h"
73 #ifndef DOXYGEN_SHOULD_SKIP_THIS
76 #ifdef ALLOCATE_USER_TAGS
77 #define USER_PREFIX GRASSROOTS_USERS_API
78 #define USER_VAL(x) = x
79 #define USER_CONCAT_VAL(x,y) = x y
81 #define USER_PREFIX extern GRASSROOTS_USERS_API
83 #define USER_CONCAT_VAL(x,y)
97 USER_PREFIX
const char *US_ORCID_S
USER_VAL (
"orcid");
GRASSROOTS_USERS_API User * AllocateUser(bson_oid_t *id_p, const char *email_s, const char *forename_s, const char *surname_s, const char *org_s, const char *orcid_s)
Allocate a User with the given details.
const USER_PREFIX char *US_ORCID_S USER_VAL("orcid")
GRASSROOTS_USERS_API void FreeFullUsername(char *name_s)
Free a username that was previously generated by a call to GetFullUsername().
GRASSROOTS_USERS_API UserNode * AllocateUserNode(User *user_p)
Allocate a UserNode.
bson_oid_t * us_id_p
Definition: user_details.h:42
User * un_user_p
Definition: user_details.h:68
char * us_orcid_s
The user's orcid.
Definition: user_details.h:59
char * us_surname_s
The user's surname(s)
Definition: user_details.h:48
char * us_org_s
The organisation that the user is associated with.
Definition: user_details.h:56
GRASSROOTS_USERS_API User * GetUserFromNamedJSON(const json_t *json_p, const char *user_key_s)
Get a User from a json representation which is the named child object of the given json.
Definition: user_details.h:65
The keys for the Grassroots Schema.
char * us_forename_s
The user's forename(s)
Definition: user_details.h:51
#define CONTEXT_PREFIX_SCHEMA_ORG_S
Definition: schema_keys.h:103
GRASSROOTS_USERS_API User * GetUserFromJSON(const json_t *user_json_p)
Get a User from a json representation.
GRASSROOTS_USERS_API void FreeUserNode(ListItem *node_p)
Free a UserNode and its associated User.
const USER_PREFIX char *US_FORENAME_S USER_CONCAT_VAL(CONTEXT_PREFIX_SCHEMA_ORG_S, "givenName")
ListItem un_node
Definition: user_details.h:67
#define GRASSROOTS_USERS_API
Definition: grassroots_users_library.h:46
GRASSROOTS_USERS_API json_t * GetUserAsJSON(const User *user_p, const ViewFormat vf)
Get the json for a User.
A datatype to store user credentials.
Definition: user_details.h:40
GRASSROOTS_USERS_API char * GetFullUsername(const User *user_p)
Get the full name of a a User.
GRASSROOTS_USERS_API void FreeUser(User *user_p)
Free a User.
GRASSROOTS_USERS_API bool AddUserToJSON(const User *user_p, json_t *json_p, const char *const user_key_s, const ViewFormat vf)
Add a compound User json to another piece of json.
char * us_email_s
The user's email address.
Definition: user_details.h:45
A doubly-linked node that points to its predecessor and successor.
Definition: linked_list.h:43