![]() | ![]() | ![]() | Ximian Connector for Microsoft Exchange Programmer’s Reference Manual | ![]() |
---|
e2k-properties — WebDAV properties
E2kProperties* e2k_properties_new (void); E2kProperties* e2k_properties_copy (E2kProperties *props); gboolean e2k_properties_empty (E2kProperties *props); void e2k_properties_free (E2kProperties *props); gpointer e2k_properties_get_prop (E2kProperties *props, const char *propname); void e2k_properties_remove (E2kProperties *props, const char *propname); enum E2kPropType; #define E2K_PROP_TYPE_IS_ARRAY (t) void e2k_properties_set_string (E2kProperties *props, const char *propname, char *value); void e2k_properties_set_string_array (E2kProperties *props, const char *propname, GPtrArray *value); void e2k_properties_set_binary (E2kProperties *props, const char *propname, GByteArray *value); void e2k_properties_set_binary_array (E2kProperties *props, const char *propname, GPtrArray *value); void e2k_properties_set_int (E2kProperties *props, const char *propname, int value); void e2k_properties_set_int_array (E2kProperties *props, const char *propname, GPtrArray *value); void e2k_properties_set_xml (E2kProperties *props, const char *propname, xmlNode *value); void e2k_properties_set_bool (E2kProperties *props, const char *propname, gboolean value); void e2k_properties_set_float (E2kProperties *props, const char *propname, float value); void e2k_properties_set_date (E2kProperties *props, const char *propname, char *value); void e2k_properties_set_type_as_string (E2kProperties *props, const char *propname, E2kPropType type, char *value); void e2k_properties_set_type_as_string_array (E2kProperties *props, const char *propname, E2kPropType type, GPtrArray *value); void (*E2kPropertiesForeachFunc) (const char *propname, E2kPropType type, gpointer value, gpointer user_data); void e2k_properties_foreach (E2kProperties *props, E2kPropertiesForeachFunc callback, gpointer user_data); void e2k_properties_foreach_removed (E2kProperties *props, E2kPropertiesForeachFunc callback, gpointer user_data); void (*E2kPropertiesForeachNamespaceFunc) (const char *namespace, char abbrev, gpointer user_data); void e2k_properties_foreach_namespace (E2kProperties *props, E2kPropertiesForeachNamespaceFunc callback, gpointer user_data); const char* e2k_prop_namespace_name (const char *prop); char e2k_prop_namespace_abbrev (const char *prop); const char* e2k_prop_property_name (const char *prop); guint32 e2k_prop_proptag (const char *prop); const char* e2k_proptag_prop (guint32 proptag); #define E2K_PROPTAG_TYPE (proptag) #define E2K_PROPTAG_ID (proptag)
E2kProperties* e2k_properties_new (void);
Creates a new (empty) E2kProperties structure
Returns : | the structure |
E2kProperties* e2k_properties_copy (E2kProperties *props);
Performs a deep copy of props
props : | an E2kProperties |
Returns : | a new copy of props |
gboolean e2k_properties_empty (E2kProperties *props);
Tests if props is empty.
props : | an E2kProperties |
Returns : | TRUE if props has no properties set, FALSE if it has at least one value set. |
void e2k_properties_free (E2kProperties *props);
Frees props and all of the properties it contains.
props : | an E2kProperties |
gpointer e2k_properties_get_prop (E2kProperties *props, const char *propname);
Retrieves the value of propname in props.
props : | an E2kProperties |
propname : | a property name |
Returns : | the value of propname in props, or NULL if it is not set. The caller should not free the value; it is owned by props. |
void e2k_properties_remove (E2kProperties *props, const char *propname);
Marks propname removed in props, so that the corresponding property will be removed from the object on the server if props is used in a PROPPATCH. If the property was formerly set in props, this frees the old value.
props : | an E2kProperties |
propname : | the name of a property |
typedef enum { E2K_PROP_TYPE_UNKNOWN, E2K_PROP_TYPE_STRING, E2K_PROP_TYPE_BINARY, E2K_PROP_TYPE_STRING_ARRAY, E2K_PROP_TYPE_BINARY_ARRAY, E2K_PROP_TYPE_XML, /* These are all stored as STRING or STRING_ARRAY */ E2K_PROP_TYPE_INT, E2K_PROP_TYPE_INT_ARRAY, E2K_PROP_TYPE_BOOL, E2K_PROP_TYPE_FLOAT, E2K_PROP_TYPE_DATE } E2kPropType;
The supported types of properties.
E2K_PROP_TYPE_UNKNOWN | |
E2K_PROP_TYPE_STRING | stored as a C string |
E2K_PROP_TYPE_BINARY | stored as a GByteArray |
E2K_PROP_TYPE_STRING_ARRAY | stored as a GPtrArray of C strings |
E2K_PROP_TYPE_BINARY_ARRAY | stored as a GPtrArray of GByteArrays |
E2K_PROP_TYPE_XML | stored as an xmlNode |
E2K_PROP_TYPE_INT | stored as a string |
E2K_PROP_TYPE_INT_ARRAY | stored as a string array |
E2K_PROP_TYPE_BOOL | stored as a string containing "0" or "1" |
E2K_PROP_TYPE_FLOAT | stored as a string |
E2K_PROP_TYPE_DATE | stored as a string in e2k_make_timestamp() format |
#define E2K_PROP_TYPE_IS_ARRAY(t) (((t) == E2K_PROP_TYPE_STRING_ARRAY) || ((t) == E2K_PROP_TYPE_BINARY_ARRAY) || ((t) == E2K_PROP_TYPE_INT_ARRAY))
Tests if a property type is an array type
t : | the type |
Returns : | TRUE if t is an array type |
void e2k_properties_set_string (E2kProperties *props, const char *propname, char *value);
Sets propname in props to value. props assumes ownership of value.
props : | an E2kProperties |
propname : | the name of a property |
value : | an allocated string |
void e2k_properties_set_string_array (E2kProperties *props, const char *propname, GPtrArray *value);
Sets propname in props to value. props assumes ownership of value.
props : | an E2kProperties |
propname : | the name of a property |
value : | an array of allocated strings |
void e2k_properties_set_binary (E2kProperties *props, const char *propname, GByteArray *value);
Sets propname in props to value. props assumes ownership of value.
props : | an E2kProperties |
propname : | the name of a property |
value : | a byte array |
void e2k_properties_set_binary_array (E2kProperties *props, const char *propname, GPtrArray *value);
Sets propname in props to value. props assumes ownership of value.
props : | an E2kProperties |
propname : | the name of a property |
value : | an array of byte arrays |
void e2k_properties_set_int (E2kProperties *props, const char *propname, int value);
Sets propname in props to value.
props : | an E2kProperties |
propname : | the name of a property |
value : | an integer |
void e2k_properties_set_int_array (E2kProperties *props, const char *propname, GPtrArray *value);
Sets propname in props to value. props assumes ownership of value.
props : | an E2kProperties |
propname : | the name of a property |
value : | an array of integers |
void e2k_properties_set_xml (E2kProperties *props, const char *propname, xmlNode *value);
Sets propname in props to value. props assumes ownership of value.
props : | an E2kProperties |
propname : | the name of a property |
value : | an xmlNode |
void e2k_properties_set_bool (E2kProperties *props, const char *propname, gboolean value);
Sets propname in props to value. value.
props : | an E2kProperties |
propname : | the name of a property |
value : | a boolean value |
void e2k_properties_set_float (E2kProperties *props, const char *propname, float value);
Sets propname in props to value.
props : | an E2kProperties |
propname : | the name of a property |
value : | a floating-point value |
void e2k_properties_set_date (E2kProperties *props, const char *propname, char *value);
Sets propname in props to value. props assumes ownership of value.
props : | an E2kProperties |
propname : | the name of a property |
value : | an allocated string containing an Exchange timestamp |
void e2k_properties_set_type_as_string (E2kProperties *props, const char *propname, E2kPropType type, char *value);
Sets propname in props to value, but with type type. props assumes ownership of value.
props : | an E2kProperties |
propname : | the name of a property |
type : | the type of value |
value : | an allocated string |
void e2k_properties_set_type_as_string_array (E2kProperties *props, const char *propname, E2kPropType type, GPtrArray *value);
Sets propname in props to value, but with type type. props assumes ownership of value.
props : | an E2kProperties |
propname : | the name of a property |
type : | the type of value |
value : | an array of allocated strings |
void (*E2kPropertiesForeachFunc) (const char *propname, E2kPropType type, gpointer value, gpointer user_data);
The callback for e2k_properties_foreach() and e2k_properties_foreach_removed().
propname : | property name |
type : | property type |
value : | property value |
user_data : | user data |
void e2k_properties_foreach (E2kProperties *props, E2kPropertiesForeachFunc callback, gpointer user_data);
Calls callback once for each property that is set in props (in unspecified order), passing it the name of the property, the property's type, its value, and user_data.
props : | an E2kProperties |
callback : | callback function to call for each set property |
user_data : | data to pass to callback |
void e2k_properties_foreach_removed (E2kProperties *props, E2kPropertiesForeachFunc callback, gpointer user_data);
Calls callback once for each property marked removed in props (in unspecified order), passing it the name of the property, the property's type (if known), a NULL value, and user_data.
props : | an E2kProperties |
callback : | callback function to call for each set property |
user_data : | data to pass to callback |
void (*E2kPropertiesForeachNamespaceFunc) (const char *namespace, char abbrev, gpointer user_data);
The callback for e2k_properties_foreach_namespace()
namespace : | namespace name |
abbrev : | namespace abbreviation |
user_data : | user data |
void e2k_properties_foreach_namespace (E2kProperties *props, E2kPropertiesForeachNamespaceFunc callback, gpointer user_data);
Calls callback once for each unique namespace used by the properties (set or removed) in props, passing it the name of the namespace, its standard abbreviation, and user_data.
props : | an E2kProperties |
callback : | callback function to call for each namespace |
user_data : | data to pass to callback |
const char* e2k_prop_namespace_name (const char *prop);
Splits out the namespace portion of prop
prop : | the name of a property |
Returns : | the URI of prop's namespace |
char e2k_prop_namespace_abbrev (const char *prop);
Splits out the namespace portion of prop and assigns a unique abbreviation for it.
prop : | the name of a property |
Returns : | the abbreviation used for prop's namespace |
const char* e2k_prop_property_name (const char *prop);
Splits out the non-namespace portion of prop
prop : | the name of a property |
Returns : | the non-namespaced name of prop |
guint32 e2k_prop_proptag (const char *prop);
Computes the MAPI proptag value of prop, which must be the name of a MAPI property.
prop : | the name of a MAPI property |
Returns : | the MAPI proptag value |
const char* e2k_proptag_prop (guint32 proptag);
Computes the WebDAV property name of the property with the given proptag.
proptag : | a MAPI property |
Returns : | the WebDAV property name associated with proptag |
#define E2K_PROPTAG_TYPE(proptag) (proptag & 0xFFFF)
Returns the MAPI property type of proptag
proptag : | a MAPI proptag |
Returns : | the MAPI type |
<< E2kContext | E2kGlobalCatalog >> |