![]() | ![]() | ![]() | Ximian Connector for Microsoft Exchange Programmer’s Reference Manual | ![]() |
---|
e2k-rule —
struct E2kRuleProp; void e2k_rule_prop_set (E2kRuleProp *prop, const char *propname); struct E2kPropValue; enum E2kActionType; struct E2kAddrEntry; struct E2kAddrList; struct E2kAction; #define E2K_RULE_STATE_DISABLED #define E2K_RULE_STATE_ENABLED #define E2K_RULE_STATE_ERROR #define E2K_RULE_STATE_ONLY_WHEN_OOF #define E2K_RULE_STATE_KEEP_OOF_HISTORY #define E2K_RULE_STATE_EXIT_LEVEL #define E2K_RULE_STATE_CLEAR_OOF_HISTORY struct E2kRule; struct E2kRules; E2kRules* e2k_rules_from_binary (GByteArray *ba); GByteArray* e2k_rules_to_binary (E2kRules *rules); void e2k_rules_free (E2kRules *rules); void e2k_rule_free (E2kRule *rule); void e2k_rule_write_uint32 (guint8 *ptr, guint32 val); void e2k_rule_append_uint32 (GByteArray *ba, guint32 val); guint32 e2k_rule_read_uint32 (guint8 *ptr); gboolean e2k_rule_extract_uint32 (guint8 **ptr, int *len, guint32 *val); void e2k_rule_write_uint16 (guint8 *ptr, guint16 val); void e2k_rule_append_uint16 (GByteArray *ba, guint16 val); guint16 e2k_rule_read_uint16 (guint8 *ptr); gboolean e2k_rule_extract_uint16 (guint8 **ptr, int *len, guint16 *val); void e2k_rule_append_byte (GByteArray *ba, guint8 val); gboolean e2k_rule_extract_byte (guint8 **ptr, int *len, guint8 *val); void e2k_rule_append_string (GByteArray *ba, const char *str); gboolean e2k_rule_extract_string (guint8 **ptr, int *len, char **str); void e2k_rule_append_unicode (GByteArray *ba, const char *str); gboolean e2k_rule_extract_unicode (guint8 **ptr, int *len, char **str); void e2k_rule_append_binary (GByteArray *ba, GByteArray *data); gboolean e2k_rule_extract_binary (guint8 **ptr, int *len, GByteArray **data); void e2k_rule_append_proptag (GByteArray *ba, E2kRuleProp *prop); gboolean e2k_rule_extract_proptag (guint8 **ptr, int *len, E2kRuleProp *prop); void e2k_rule_append_propvalue (GByteArray *ba, E2kPropValue *pv); gboolean e2k_rule_extract_propvalue (guint8 **ptr, int *len, E2kPropValue *pv); void e2k_rule_free_propvalue (E2kPropValue *pv);
void e2k_rule_prop_set (E2kRuleProp *prop, const char *propname);
This is a convenience function to set both the name and proptag fields of prop.
prop : | an E2kRuleProp |
propname : | a MAPI property name |
typedef enum { E2K_ACTION_MOVE = 1, E2K_ACTION_COPY = 2, E2K_ACTION_REPLY = 3, E2K_ACTION_OOF_REPLY = 4, E2K_ACTION_DEFER = 5, E2K_ACTION_BOUNCE = 6, E2K_ACTION_FORWARD = 7, E2K_ACTION_DELEGATE = 8, E2K_ACTION_TAG = 9, E2K_ACTION_DELETE = 10, E2K_ACTION_MARK_AS_READ = 11 } E2kActionType;
struct E2kAction { E2kActionType type; guint32 flavor; guint32 flags; union { struct { GByteArray *store_entryid; GByteArray *folder_source_key; } xfer; struct { GByteArray *entryid; guint8 reply_template_guid[16]; } reply; GByteArray *defer_data; gint32 bounce_code; E2kAddrList *addr_list; E2kPropValue proptag; } act; };
struct E2kRule { char *name; guint32 sequence; guint32 state; guint32 user_flags; guint32 level; guint32 condition_lcid; E2kRestriction *condition; GPtrArray *actions; char *provider; GByteArray *provider_data; };
E2kRules* e2k_rules_from_binary (GByteArray *ba);
Extract rules from rules_data and returns them in an E2kRules structure.
ba : | |
Returns : | the rules, or NULL on error. |
GByteArray* e2k_rules_to_binary (E2kRules *rules);
Encodes rules into binary form
rules : | an E2kRules structure |
Returns : | the binary-encoded rules |
void e2k_rules_free (E2kRules *rules);
Frees rules and the rules it contains
rules : | an E2kRules structure |
void e2k_rule_write_uint32 (guint8 *ptr, guint32 val);
Writes val into the rule at ptr
ptr : | pointer into a binary rule |
val : | a uint32 value |
void e2k_rule_append_uint32 (GByteArray *ba, guint32 val);
Appends val to the rule in ba
ba : | a byte array containing a binary rule |
val : | a uint32 value |
guint32 e2k_rule_read_uint32 (guint8 *ptr);
Reads a uint32 value from the rule at ptr
ptr : | pointer into a binary rule |
Returns : | the uint32 value |
gboolean e2k_rule_extract_uint32 (guint8 **ptr, int *len, guint32 *val);
Reads a uint32 value from the rule at **ptr into *val and updates *ptr and *len accordingly.
ptr : | pointer to a pointer into a binary rule |
len : | pointer to the remaining length of *ptr |
val : | pointer to a uint32 value |
Returns : | success or failure |
void e2k_rule_write_uint16 (guint8 *ptr, guint16 val);
Writes val into the rule at ptr
ptr : | pointer into a binary rule |
val : | a uint16 value |
void e2k_rule_append_uint16 (GByteArray *ba, guint16 val);
Appends val to the rule in ba
ba : | a byte array containing a binary rule |
val : | a uint16 value |
guint16 e2k_rule_read_uint16 (guint8 *ptr);
Reads a uint16 value from the rule at ptr
ptr : | pointer into a binary rule |
Returns : | the uint16 value |
gboolean e2k_rule_extract_uint16 (guint8 **ptr, int *len, guint16 *val);
Reads a uint16 value from the rule at **ptr into *val and updates *ptr and *len accordingly.
ptr : | pointer to a pointer into a binary rule |
len : | pointer to the remaining length of *ptr |
val : | pointer to a uint16 value |
Returns : | success or failure |
void e2k_rule_append_byte (GByteArray *ba, guint8 val);
Appends val to the rule in ba
ba : | a byte array containing a binary rule |
val : | a byte value |
gboolean e2k_rule_extract_byte (guint8 **ptr, int *len, guint8 *val);
Reads a byte value from the rule at **ptr into *val and updates *ptr and *len accordingly.
ptr : | pointer to a pointer into a binary rule |
len : | pointer to the remaining length of *ptr |
val : | pointer to a byte value |
Returns : | success or failure |
void e2k_rule_append_string (GByteArray *ba, const char *str);
Appends str to the rule in ba
ba : | a byte array containing a binary rule |
str : | a (Windows) locale-encoded string |
gboolean e2k_rule_extract_string (guint8 **ptr, int *len, char **str);
Reads a (Windows) locale-encoded string from the rule at **ptr into *str and updates *ptr and *len accordingly.
ptr : | pointer to a pointer into a binary rule |
len : | pointer to the remaining length of *ptr |
str : | pointer to a string pointer |
Returns : | success or failure |
void e2k_rule_append_unicode (GByteArray *ba, const char *str);
Appends str to the rule in ba
ba : | a byte array containing a binary rule |
str : | a UTF-8 string |
gboolean e2k_rule_extract_unicode (guint8 **ptr, int *len, char **str);
Reads a Unicode-encoded string from the rule at **ptr into *str and updates *ptr and *len accordingly.
ptr : | pointer to a pointer into a binary rule |
len : | pointer to the remaining length of *ptr |
str : | pointer to a string pointer |
Returns : | success or failure |
void e2k_rule_append_binary (GByteArray *ba, GByteArray *data);
Appends data (with a 2-byte length prefix) to the rule in ba
ba : | a byte array containing a binary rule |
data : | binary data |
gboolean e2k_rule_extract_binary (guint8 **ptr, int *len, GByteArray **data);
Reads binary data (preceded by a 2-byte length) from the rule at **ptr into *data and updates *ptr and *len accordingly.
ptr : | pointer to a pointer into a binary rule |
len : | pointer to the remaining length of *ptr |
data : | pointer to a GByteArray |
Returns : | success or failure |
void e2k_rule_append_proptag (GByteArray *ba, E2kRuleProp *prop);
Appends a representation of prop to the rule in ba
ba : | a byte array containing a binary rule |
prop : | an E2kRuleProp |
gboolean e2k_rule_extract_proptag (guint8 **ptr, int *len, E2kRuleProp *prop);
Reads a proptag from the rule at **ptr into *prop and updates *ptr and *len accordingly.
ptr : | pointer to a pointer into a binary rule |
len : | pointer to the remaining length of *ptr |
prop : | poitner to an E2kRuleProp |
Returns : | success or failure |
void e2k_rule_append_propvalue (GByteArray *ba, E2kPropValue *pv);
Appends a representation of pv (the proptag and its value) to the rule in ba
ba : | a byte array containing a binary rule |
pv : | an E2kPropValue |
gboolean e2k_rule_extract_propvalue (guint8 **ptr, int *len, E2kPropValue *pv);
Reads a representation of an E2kPropValue from the rule at **ptr into *pv and updates *ptr and *len accordingly.
ptr : | pointer to a pointer into a binary rule |
len : | pointer to the remaining length of *ptr |
pv : | pointer to an E2kPropValue |
Returns : | success or failure |
void e2k_rule_free_propvalue (E2kPropValue *pv);
Frees pv
pv : | an E2kPropValue |
<< E2kSecurityDescriptor | e2k-action >> |