A search is made of 3 parts:
A search filter is exposed as a tree where each node is a part of the search criteria.
There are compound nodes, such as and , or and not . And there are simple (or leaf) nodes that express an actual filter rule.
#include <alp/postal_types.h>
#include <alp/postal_property.h>
#include <alp/postal_address.h>
Go to the source code of this file.
Data Structures | |
| struct | _AlpPostalSearchCriteriaAnd |
| Holds a list of search nodes on which a AND operator applies. More... | |
| struct | _AlpPostalSearchCriteriaExist |
| A filter criteria on a property existence (NULL or not). More... | |
| struct | _AlpPostalSearchCriteriaLink |
| A search criteria that applies on a linked object. This filter applies only on envelope onject. More... | |
| struct | _AlpPostalSearchCriteriaNot |
| Holds a search node on which a NOT operator applies. More... | |
| struct | _AlpPostalSearchCriteriaOr |
| Holds a list of search nodes on which a OR operator applies. More... | |
| struct | _AlpPostalSearchCriteriaProp |
| A filter criteria on a simple property. The filter is made of 4 pieces of information:. More... | |
| struct | _AlpPostalSearchNode |
| Holds a filter criteria. More... | |
| struct | _AlpPostalSortCriteria |
| Defines a sort criteria. More... | |
POSTAL FILTER FLAGS | |
| Defines search options to be used in the property filter criteria. Applies to string properties only. | |
| #define | ALP_POSTAL_FILTER_FLAG_IGNORE_CASE ((alp_postal_filter_flag_t)1<<0) |
| Ignore case. | |
| #define | ALP_POSTAL_FILTER_FLAG_NONE ((alp_postal_filter_flag_t)0) |
| No flag. | |
| #define | ALP_POSTAL_FILTER_FLAG_REG_EXP ((alp_postal_filter_flag_t)1<<1) |
| Regular expression = pattern matching. If REG_EXP_MASK is set, the comparison operator must be ALP_POSTAL_FILTER_OP_EQ and ALP_POSTAL_FILTER_FLAG_IGNORE_CASE flag must not be set. | |
| #define | ALP_POSTAL_FILTER_FLAG_SUB_STRING ((alp_postal_filter_flag_t)1<<2) |
| Match a sub-string. If ALP_POSTAL_FILTER_FLAG_SUB_STRING is set, the comparison operator must be ALP_POSTAL_FILTER_OP_EQ. | |
POSTAL SEARCH LINKED OBJECT TYPES | |
| Linked object type. | |
| #define | ALP_POSTAL_FILTER_LINK_ADDRESS ((alp_postal_search_link_obj_t)1) |
| Recipients. | |
| #define | ALP_POSTAL_FILTER_LINK_BODY_PARTS ((alp_postal_search_link_obj_t)2) |
| Body parts. | |
| #define | ALP_POSTAL_FILTER_LINK_PARENT_FOLDER ((alp_postal_search_link_obj_t)3) |
| Parent folder. | |
POSTAL SEARCH NODE TYPES | |
| Comparison operator for a property filter criteria. | |
| #define | ALP_POSTAL_FILTER_OP_EQ ((alp_postal_search_prop_op_t)1) |
| Equal. | |
| #define | ALP_POSTAL_FILTER_OP_GE ((alp_postal_search_prop_op_t)4) |
| Greater or Equal. | |
| #define | ALP_POSTAL_FILTER_OP_GT ((alp_postal_search_prop_op_t)2) |
| Greater Than. | |
| #define | ALP_POSTAL_FILTER_OP_LE ((alp_postal_search_prop_op_t)5) |
| Lesser or Equal. | |
| #define | ALP_POSTAL_FILTER_OP_LT ((alp_postal_search_prop_op_t)3) |
| Lesser Than. | |
POSTAL SEARCH NODE TYPES | |
| Defines postal search node types. Gives a clue on the filter criteria type contained int the _AlpPostalSearchNode structure. | |
| #define | ALP_POSTAL_SEARCH_NODE_AND ((alp_postal_search_node_t)2) |
| AND filter criteria. | |
| #define | ALP_POSTAL_SEARCH_NODE_EXIST ((alp_postal_search_node_t)5) |
| EXIST filter criteria. | |
| #define | ALP_POSTAL_SEARCH_NODE_LINK ((alp_postal_search_node_t)6) |
| LINK filter criteria. | |
| #define | ALP_POSTAL_SEARCH_NODE_NOT ((alp_postal_search_node_t)3) |
| NOT filter criteria. | |
| #define | ALP_POSTAL_SEARCH_NODE_OR ((alp_postal_search_node_t)1) |
| OR filter criteria. | |
| #define | ALP_POSTAL_SEARCH_NODE_PROPERTY ((alp_postal_search_node_t)4) |
| PROPERTY filter criteria. | |
POSTAL SORT WAY TYPES | |
| Defines postal sort way. | |
| #define | ALP_POSTAL_SORT_WAY_ASCENDING ((alp_postal_sort_way_t)1) |
| Ascending, from the lowest value to the highest value. | |
| #define | ALP_POSTAL_SORT_WAY_DESCENDING ((alp_postal_sort_way_t)2) |
| Descending, rom the highest value to the lowest value. | |
Postal Search & Sort Helpers | |
| Helper functions to build filter and sort criteria. | |
| alp_status_t | alp_postal_search_cancel_find_envelopes (void) |
| Cancel a global search envelopes asynchronous request. | |
| alp_status_t | alp_postal_search_cancel_find_session_envelopes (alp_postal_service_id_t iServiceId, alp_postal_session_id_t iSessionId) |
| Cancel a search envelopes asynchrosnous request. | |
| alp_status_t | alp_postal_search_cancel_global_find_envelopes (void) |
| Cancel the global find envelopes asynchronous request. | |
| alp_status_t | alp_postal_search_contact_release_enumerator (AlpPostalEnumerator *iContactEnumeratorP) |
| free data into the enumerator and release it, must be called when data access is over. | |
| alp_status_t | alp_postal_search_envelope_release_enumerator (AlpPostalEnumerator *iEnvelopeEnumeratorP) |
| free data into the enumerator and release it, must be called when data access is over in a search request call back. | |
| alp_status_t | alp_postal_search_find_envelopes (AlpPostalServiceIdList *iServiceIdListP, AlpPostalEnvelope *iEnvelopeP, alp_postal_address_class_t iAddressMask, bool iGetBodyparts, AlpPostalSearchNode *iFilterP, AlpPostalSortCriteria *iSortP, AlpPostalSearchFindEnvelopesAsyncReplyCallback iCallbackFuncP) |
| Perform a global search on the messaging system - async request. | |
| alp_status_t | alp_postal_search_find_envelopes_sync (AlpPostalServiceIdList *iServiceIdListP, AlpPostalEnvelope *iEnvelopeP, alp_postal_address_class_t iAddressMask, bool iGetBodyparts, AlpPostalSearchNode *iFilterP, AlpPostalSortCriteria *iSortP, AlpPostalEnumerator *oEnvelopeEnumeratorP) |
| Perform a global search on the messaging system - sync request. | |
| alp_status_t | alp_postal_search_find_session_envelopes (alp_postal_service_id_t iServiceId, alp_postal_session_id_t iSessionId, AlpPostalEnvelope *iEnvelopeP, alp_postal_address_class_t iAddressMask, bool iGetBodyparts, AlpPostalSearchNode *iFilterP, AlpPostalSortCriteria *iSortP, AlpPostalSearchFindSessionEnvelopesAsyncReplyCallback iCallbackFuncP) |
| Perform a local search on a particuar session - async request. | |
| alp_status_t | alp_postal_search_find_session_envelopes_sync (alp_postal_service_id_t iServiceId, alp_postal_session_id_t iSessionId, AlpPostalEnvelope *iEnvelopeP, alp_postal_address_class_t iAddressMask, bool iGetBodyparts, AlpPostalSearchNode *iFilterP, AlpPostalSortCriteria *iSortP, AlpPostalEnumerator *oEnvelopeEnumeratorP) |
| Perform a local search on a particuar session - sync request. | |
| alp_status_t | alp_postal_search_get_next_contact (AlpPostalEnumerator *iContactEnumeratorP, AlpPostalAddress *oContactP) |
| Return the address structure for the current position and increment it. | |
| alp_status_t | alp_postal_search_get_next_envelope (AlpPostalEnumerator *iEnvelopeEnumeratorP, AlpPostalEnvelope *oEnvelopeP) |
| Return the envelope structure for the current position and increment it. | |
| alp_status_t | alp_postal_search_global_find_envelopes (AlpPostalServiceIdList *iServiceIdListP, char *iSearchItem, AlpPostalSearchGlobalFindEnvelopesAsyncReplyCallback iCallbackFuncP) |
| Perform a case insensitive global find on the messaging system - async request. | |
| alp_status_t | alp_postal_search_node_and_add_child (AlpPostalSearchNode *iAndNode, AlpPostalSearchNode *iChildNode) |
| Add a child to an and filter criteria. | |
| AlpPostalSearchNode * | alp_postal_search_node_and_new (void) |
| Create a new and filter criteria. | |
| AlpPostalSearchNode * | alp_postal_search_node_exist_new (alp_postal_property_id_t iProperty, bool iExist) |
| Create a new exist filter criteria. | |
| void | alp_postal_search_node_free (AlpPostalSearchNode **iNode) |
| Free a whole filter node tree. | |
| AlpPostalSearchNode * | alp_postal_search_node_link_new (alp_postal_search_link_obj_t iLinkedObject, AlpPostalSearchNode *iNode) |
| Create a new link filter criteria. | |
| AlpPostalSearchNode * | alp_postal_search_node_not_new (AlpPostalSearchNode *iNode) |
| Create a new not filter criteria. | |
| alp_status_t | alp_postal_search_node_or_add_child (AlpPostalSearchNode *iOrNode, AlpPostalSearchNode *iChildNode) |
| Add a child to an or filter criteria. | |
| AlpPostalSearchNode * | alp_postal_search_node_or_new (void) |
| Create a new or filter criteria. | |
| AlpPostalSearchNode * | alp_postal_search_node_prop_new (alp_postal_property_id_t iProperty, alp_postal_search_prop_op_t iOp, void *iValue, alp_postal_filter_flag_t iFlagMask) |
| Create a new property filter criteria. | |
| alp_status_t | alp_postal_search_sync_envelope_init_enumerator (AlpPostalEnumerator *iEnvelopeEnumeratorP) |
| Initialize an search envelope enumerator to be used with a sync search API. MUST be called before alp_postal_search_find_envelopes_sync and alp_postal_search_find_session_envelopes_sync API. | |
| alp_status_t | alp_postal_search_sync_envelope_release_enumerator (AlpPostalEnumerator *iEnvelopeEnumeratorP) |
| free data into the enumerator and release it, must be called when data access is over when the enumerator is filled by a synchronous search API call. | |
| void | alp_postal_sort_criteria_free (AlpPostalSortCriteria **iCriteria) |
| Free a sort criteria. | |
| AlpPostalSortCriteria * | alp_postal_sort_criteria_new (alp_postal_property_id_t iProperty, alp_postal_sort_way_t iWay) |
| Create a new sort criteria. | |
| alp_status_t | alp_postal_sort_criteria_set_secondary_sort (AlpPostalSortCriteria *iSort, alp_postal_property_id_t iProperty, alp_postal_sort_way_t iWay) |
| Add a secondary sort criteria. | |
Typedefs | |
| typedef uint8_t | alp_postal_filter_flag_t |
| postal Filter Flags type. | |
| typedef void * | alp_postal_filter_prop_value_t |
| postal Sort Way Types type. | |
| typedef uint8_t | alp_postal_search_link_obj_t |
| postal Search linked object type. | |
| typedef uint8_t | alp_postal_search_node_t |
| postal Search Node Types type. | |
| typedef uint8_t | alp_postal_search_prop_op_t |
| postal Search property operator Types type. | |
| typedef uint8_t | alp_postal_sort_way_t |
| postal Sort Way Types type. | |
| typedef _AlpPostalSearchCriteriaAnd | AlpPostalSearchCriteriaAnd |
| Holds a list of search nodes on which a AND operator applies. | |
| typedef _AlpPostalSearchCriteriaExist | AlpPostalSearchCriteriaExist |
| A filter criteria on a property existence (NULL or not). | |
| typedef _AlpPostalSearchCriteriaLink | AlpPostalSearchCriteriaLink |
| A search criteria that applies on a linked object. This filter applies only on envelope onject. | |
| typedef _AlpPostalSearchCriteriaNot | AlpPostalSearchCriteriaNot |
| Holds a filter criteria on which a NOT operator applies. | |
| typedef _AlpPostalSearchCriteriaOr | AlpPostalSearchCriteriaOr |
| Holds a list of search nodes on which a OR operator applies. | |
| typedef _AlpPostalSearchCriteriaProp | AlpPostalSearchCriteriaProp |
| A filter criteria on a simple property. | |
| typedef void(* | AlpPostalSearchFindEnvelopesAsyncReplyCallback )(AlpPostalEnumerator *iEnvelopeEnumeratorP, alp_status_t iRequestResult) |
| Postal global envelopes search request async response Callback. | |
| typedef void(* | AlpPostalSearchFindSessionEnvelopesAsyncReplyCallback )(alp_postal_service_id_t iServiceId, alp_postal_session_id_t iSessiontId, AlpPostalEnumerator *iEnvelopeEnumeratorP, alp_status_t iRequestResult) |
| Postal global envelopes search request async response Callback. | |
| typedef void(* | AlpPostalSearchGlobalFindEnvelopesAsyncReplyCallback )(alp_postal_service_id_t iServiceId, alp_postal_envelope_id_t iEnvelopeId, alp_status_t iRequestResult) |
| Postal global find search request async response Callback. | |
| typedef _AlpPostalSearchNode | AlpPostalSearchNode |
| A common search filter node. | |
| typedef _AlpPostalSortCriteria | AlpPostalSortCriteria |
| Defines a sort criteria. | |
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.