meanwhile
1.0.2
|
Go to the source code of this file.
Macros | |
#define | KEY_IS_LOTUS_RESERVED(key) (((guint32) key) <= (LOTUS_RESERVED_LIMIT)) |
Check if a key is in the range of Lotus reserved keys. More... | |
#define | LOTUS_RESERVED_LIMIT 0x186a0 |
The upper limit of reserved Lotus keys. More... | |
#define | mwService_STORAGE 0x00000018 |
Type identifier for the storage service. More... | |
Typedefs | |
typedef void(* | mwStorageCallback) (struct mwServiceStorage *srvc, guint32 result, struct mwStorageUnit *item, gpointer data) |
Appropriate function type for load and store callbacks. More... | |
Enumerations | |
enum | mwStorageKey { mwStore_AWARE_LIST = 0x00000000, mwStore_INVITE_CHAT = 0x00000006, mwStore_INVITE_MEETING = 0x0000000e, mwStore_AWAY_MESSAGES = 0x00000050, mwStore_BUSY_MESSAGES = 0x0000005a, mwStore_ACTIVE_MESSAGES = 0x00000064 } |
Some common keys storage keys. More... | |
Functions | |
void | mwServiceStorage_load (struct mwServiceStorage *srvc, struct mwStorageUnit *item, mwStorageCallback cb, gpointer data, GDestroyNotify data_free) |
Initiates a load call to the storage service. More... | |
struct mwServiceStorage * | mwServiceStorage_new (struct mwSession *) |
Allocates and initializes a storage service instance for use on the passed session. More... | |
void | mwServiceStorage_save (struct mwServiceStorage *srvc, struct mwStorageUnit *item, mwStorageCallback cb, gpointer data, GDestroyNotify data_free) |
Initiates a store call to the storage service. More... | |
gboolean | mwStorageUnit_asBoolean (struct mwStorageUnit *, gboolean val) |
attempts to obtain a boolean value from a storage unit. More... | |
guint32 | mwStorageUnit_asInteger (struct mwStorageUnit *, guint32 val) |
attempts to obtain a guint32 value from a storage unit. More... | |
struct mwOpaque * | mwStorageUnit_asOpaque (struct mwStorageUnit *) |
direct access to the opaque data backing the storage unit More... | |
char * | mwStorageUnit_asString (struct mwStorageUnit *) |
attempts to obtain a string value from a storage unit. More... | |
void | mwStorageUnit_free (struct mwStorageUnit *) |
clears and frees a storage unit More... | |
guint32 | mwStorageUnit_getKey (struct mwStorageUnit *) |
get the key for the given storage unit More... | |
struct mwStorageUnit * | mwStorageUnit_new (guint32 key) |
create an empty storage unit More... | |
struct mwStorageUnit * | mwStorageUnit_newBoolean (guint32 key, gboolean val) |
creates a storage unit with the passed key, and an encapsulated boolean value More... | |
struct mwStorageUnit * | mwStorageUnit_newInteger (guint32 key, guint32 val) |
struct mwStorageUnit * | mwStorageUnit_newOpaque (guint32 key, struct mwOpaque *data) |
creates a storage unit with the passed key, and a copy of data. More... | |
struct mwStorageUnit * | mwStorageUnit_newString (guint32 key, const char *str) |
creates a storage unit with the passed key, and an encapsulated string value. More... | |
#define KEY_IS_LOTUS_RESERVED | ( | key | ) | (((guint32) key) <= (LOTUS_RESERVED_LIMIT)) |
Check if a key is in the range of Lotus reserved keys.
#define LOTUS_RESERVED_LIMIT 0x186a0 |
The upper limit of reserved Lotus keys.
#define mwService_STORAGE 0x00000018 |
Type identifier for the storage service.
typedef void(* mwStorageCallback) (struct mwServiceStorage *srvc, guint32 result, struct mwStorageUnit *item, gpointer data) |
Appropriate function type for load and store callbacks.
srvc | the storage service |
result | the result value of the load or store call |
item | the storage unit loaded or saved |
data | optional user data |
enum mwStorageKey |
Some common keys storage keys.
Anything in the range 0x00 to 0x186a0 (100000) is reserved for use by the Lotus clients.
void mwServiceStorage_load | ( | struct mwServiceStorage * | srvc, |
struct mwStorageUnit * | item, | ||
mwStorageCallback | cb, | ||
gpointer | data, | ||
GDestroyNotify | data_free | ||
) |
Initiates a load call to the storage service.
If the service is not currently available, the call will be cached and processed when the service is started.
srvc | the storage service |
item | storage unit to load |
cb | callback function when the load call completes |
data | user data for callback |
data_free | optional cleanup function for user data |
struct mwServiceStorage* mwServiceStorage_new | ( | struct mwSession * | ) |
Allocates and initializes a storage service instance for use on the passed session.
void mwServiceStorage_save | ( | struct mwServiceStorage * | srvc, |
struct mwStorageUnit * | item, | ||
mwStorageCallback | cb, | ||
gpointer | data, | ||
GDestroyNotify | data_free | ||
) |
Initiates a store call to the storage service.
If the service is not currently available, the call will be cached and processed when the service is started.
srvc | the storage service |
item | storage unit to save |
cb | callback function when the load call completes |
data | optional user data for callback |
data_free | optional cleanup function for user data |
gboolean mwStorageUnit_asBoolean | ( | struct mwStorageUnit * | , |
gboolean | val | ||
) |
attempts to obtain a boolean value from a storage unit.
If the unit is empty, or does not contain the type in a recongnizable format, val is returned instead
guint32 mwStorageUnit_asInteger | ( | struct mwStorageUnit * | , |
guint32 | val | ||
) |
attempts to obtain a guint32 value from a storage unit.
If the unit is empty, or does not contain the type in a recognizable format, val is returned instead
struct mwOpaque* mwStorageUnit_asOpaque | ( | struct mwStorageUnit * | ) |
direct access to the opaque data backing the storage unit
char* mwStorageUnit_asString | ( | struct mwStorageUnit * | ) |
attempts to obtain a string value from a storage unit.
If the unit is empty, or does not contain the type in a recognizable format, NULL is returned instead. Note that the string returned is a copy, and will need to be deallocated at some point.
void mwStorageUnit_free | ( | struct mwStorageUnit * | ) |
clears and frees a storage unit
guint32 mwStorageUnit_getKey | ( | struct mwStorageUnit * | ) |
get the key for the given storage unit
struct mwStorageUnit* mwStorageUnit_new | ( | guint32 | key | ) |
create an empty storage unit
struct mwStorageUnit* mwStorageUnit_newBoolean | ( | guint32 | key, |
gboolean | val | ||
) |
creates a storage unit with the passed key, and an encapsulated boolean value
struct mwStorageUnit* mwStorageUnit_newInteger | ( | guint32 | key, |
guint32 | val | ||
) |
struct mwStorageUnit* mwStorageUnit_newOpaque | ( | guint32 | key, |
struct mwOpaque * | data | ||
) |
creates a storage unit with the passed key, and a copy of data.
struct mwStorageUnit* mwStorageUnit_newString | ( | guint32 | key, |
const char * | str | ||
) |
creates a storage unit with the passed key, and an encapsulated string value.