|  |  |  | Evolution Connector for Microsoft Exchange Programmer’s Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | ||||
struct E2kAction; enum E2kActionType; E2kAction * e2k_action_move (GByteArray *store_entryid,GByteArray *folder_source_key); E2kAction * e2k_action_copy (GByteArray *store_entryid,GByteArray *folder_source_key); enum E2kActionReplyFlavor; E2kAction * e2k_action_reply (GByteArray *template_entryid,guint8 template_guid[16]); E2kAction * e2k_action_oof_reply (GByteArray *template_entryid,guint8 template_guid[16]); E2kAction * e2k_action_defer (GByteArray *data); enum E2kActionBounceCode; E2kAction * e2k_action_bounce (E2kActionBounceCode bounce_code); struct E2kAddrList; enum E2kActionForwardFlavor; E2kAction * e2k_action_forward (E2kAddrList *list); E2kAction * e2k_action_delegate (E2kAddrList *list); E2kAction * e2k_action_tag (const gchar *propname,E2kPropType type,gpointer value); E2kAction * e2k_action_delete (void); gboolean e2k_actions_extract (guint8 **data,gint *len,GPtrArray **actions); void e2k_actions_append (GByteArray *ba,GPtrArray *actions); void e2k_actions_free (GPtrArray *actions); void e2k_action_free (E2kAction *act); E2kAddrList * e2k_addr_list_new (gint nentries); void e2k_addr_list_set_local (E2kAddrList *list,gint entry_num,const gchar *display_name,const gchar *exchange_dn,const gchar *email); void e2k_addr_list_set_oneoff (E2kAddrList *list,gint entry_num,const gchar *display_name,const gchar *email); void e2k_addr_list_free (E2kAddrList *list);
E2kAction represents a single action taken by a server-side rule.
This code is not heavily tested. It is possible that some of the information in this file about how server-side rules work is wrong.
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;
E2kAction * e2k_action_move (GByteArray *store_entryid,GByteArray *folder_source_key);
Creates a rule action to move a message into the indicated folder
| 
 | The PR_STORE_ENTRYID of the message store | 
| 
 | The PR_SOURCE_KEY of a folder in that store | 
| Returns : | the new rule action | 
E2kAction * e2k_action_copy (GByteArray *store_entryid,GByteArray *folder_source_key);
Creates a rule action to copy a message into the indicated folder
| 
 | The PR_STORE_ENTRYID of the message store | 
| 
 | The PR_SOURCE_KEY of a folder in that store | 
| Returns : | the new rule action | 
typedef enum {
	E2K_ACTION_REPLY_FLAVOR_NOT_ORIGINATOR = 1,
	E2K_ACTION_REPLY_FLAVOR_STOCK_TEMPLATE = 2
} E2kActionReplyFlavor;
E2kAction * e2k_action_reply (GByteArray *template_entryid,guint8 template_guid[16]);
Creates a rule action to reply to a message using the indicated template
| 
 | The entryid of the reply template | 
| 
 | The GUID of the reply template | 
| Returns : | the new rule action | 
E2kAction * e2k_action_oof_reply (GByteArray *template_entryid,guint8 template_guid[16]);
Creates a rule action to send an Out-of-Office reply to a message using the indicated template
| 
 | The entryid of the reply template | 
| 
 | The GUID of the reply template | 
| Returns : | the new rule action | 
E2kAction *         e2k_action_defer                    (GByteArray *data);
Creates a rule action to defer processing on a message
| 
 | data identifying the deferred action | 
| Returns : | the new rule action | 
typedef enum {
	E2K_ACTION_BOUNCE_CODE_TOO_LARGE     = 13,
	E2K_ACTION_BOUNCE_CODE_FORM_MISMATCH = 31,
	E2K_ACTION_BOUNCE_CODE_ACCESS_DENIED = 38
} E2kActionBounceCode;
E2kAction *         e2k_action_bounce                   (E2kActionBounceCode bounce_code);
Creates a rule action to bounce a message
| 
 | a bounce code | 
| Returns : | the new rule action | 
typedef enum {
	E2K_ACTION_FORWARD_FLAVOR_PRESERVE_SENDER = 1,
	E2K_ACTION_FORWARD_FLAVOR_DO_NOT_MUNGE    = 2,
	E2K_ACTION_FORWARD_FLAVOR_REDIRECT        = 3,
	E2K_ACTION_FORWARD_FLAVOR_AS_ATTACHMENT   = 4
} E2kActionForwardFlavor;
E2kAction *         e2k_action_forward                  (E2kAddrList *list);
Creates a rule action to forward a message to the indicated list of recipients
| 
 | a list of recipients | 
| Returns : | the new rule action | 
E2kAction *         e2k_action_delegate                 (E2kAddrList *list);
Creates a rule action to delegate a meeting request to the indicated list of recipients
| 
 | a list of recipients | 
| Returns : | the new rule action | 
E2kAction * e2k_action_tag (const gchar *propname,E2kPropType type,gpointer value);
Creates a rule action to set the given property to the given value on a message.
| 
 | a MAPI property name | 
| 
 | the type of propname | 
| 
 | the value for propname | 
| Returns : | the new rule action | 
E2kAction *         e2k_action_delete                   (void);
Creates a rule action to permanently delete a message (ie, not just move it to the trash).
| Returns : | the new rule action | 
gboolean e2k_actions_extract (guint8 **data,gint *len,GPtrArray **actions);
Attempts to extract a list of actions from *data, which contains a
binary-encoded list of actions from a server-side rule.
On success, *actions will contain the extracted list, *data will
be advanced past the end of the restriction data, and *len will be
decremented accordingly.
| 
 | pointer to data pointer | 
| 
 | pointer to data length | 
| 
 | pointer to array to store actions in | 
| Returns : | success or failure | 
void e2k_actions_append (GByteArray *ba,GPtrArray *actions);
Appends actions to ba as part of a server-side rule.
| 
 | a buffer into which a server-side rule is being constructed | 
| 
 | the actions to append to ba | 
void                e2k_actions_free                    (GPtrArray *actions);
Frees actions and all of its elements
| 
 | an array of E2kAction | 
E2kAddrList *       e2k_addr_list_new                   (gint nentries);
Creates an address list for a forward or delegate rule, with
nentries slots
| 
 | the number of entries | 
| Returns : | the new address list | 
void e2k_addr_list_set_local (E2kAddrList *list,gint entry_num,const gchar *display_name,const gchar *exchange_dn,const gchar *email);
Sets entry number entry_num of list to refer to the indicated
local Exchange user.
| 
 | the address list | 
| 
 | the list entry to set | 
| 
 | the UTF-8 display name of the recipient | 
| 
 | the Exchange 5.5-style DN of the recipient | 
| 
 | the SMTP email address of the recipient | 
void e2k_addr_list_set_oneoff (E2kAddrList *list,gint entry_num,const gchar *display_name,const gchar *email);
Sets entry number entry_num of list to refer to the indicated
"one-off" SMTP user.
| 
 | the address list | 
| 
 | the list entry to set | 
| 
 | the UTF-8 display name of the recipient | 
| 
 | the SMTP email address of the recipient | 
void                e2k_addr_list_free                  (E2kAddrList *list);
Frees list and all its entries.
| 
 | the address list |