Msg_Mapi_FilterRule.h File Reference


Detailed Description

Defines the filter related structures.

MSG_FILTER_S and MSG_FILTER_LIST_S define the criteria for session's interested incoming messages.

MSG_FILTER_S represents the basic filter unit, with a pair of filter type and filter value. A filter is satisfied when the filter value meets the requirement of specific filter type.

MSG_FILTER_LIST_S is composed of a series of various MSG_FILTER_S. A filter list is satisfied when one of filters in the list satisfied.

The first filter in the list has the highest priority, the last the lowest. Framework will check the filter list from the first to the last. Once an incoming message satisfies one filter in the list, framwork would stop checking and return.

The framework sends the satisfying messages to filter-list associated applications. If the intercept is set true, the lower priority session would not receive the messages.

See MsgPlgFilterCheckRules in Messaging Framework API [2].

#include "Msg_Mapi_Types.h"


Data Structures

struct  _MSG_FILTER_ID_LIST_S
 Represents a filter id list. More...
struct  _MSG_FILTER_S
 Represents a filter. More...
struct  _MSG_FILTER_LIST_S
 Represents a filter list. More...

Typedefs

typedef int MSG_FILTER_ID_T
 Represents the filter Id.
typedef struct
_MSG_FILTER_ID_LIST_S 
MSG_FILTER_ID_LIST_S
typedef struct _MSG_FILTER_S MSG_FILTER_S
typedef struct _MSG_FILTER_LIST_S MSG_FILTER_LIST_S

Enumerations

enum  _MSG_FILTER_ID_E {
  MSG_FILTER_BY_UNKNOWN = 0, MSG_FILTER_BY_MSG_TYPE, MSG_FILTER_BY_FROM, MSG_FILTER_BY_HAS_ATTACHMENT,
  MSG_FILTER_BY_HAS_DRM_CONTENT, MSG_FILTER_BY_SIZE_GT, MSG_FILTER_BY_SIZE_LT, MSG_FILTER_BY_PRIORITY_GT,
  MSG_FILTER_BY_PRIORITY_LT, MSG_FILTER_BY_USER_DEF_BEGIN = 0x00001000
}
 Represents the values of filter id. More...

Typedef Documentation

typedef int MSG_FILTER_ID_T

Represents the filter Id.

A filter Id represents a unique filter type. The values for this type SHOULD be in _MSG_FILTER_ID_E or other extended filter Ids.

typedef struct _MSG_FILTER_S MSG_FILTER_S


Enumeration Type Documentation

Represents the values of filter id.

This enum is used as the value of MSG_FILTER_ID_T.

For example:

    MSG_FILTER_S filter;
    filter.filterId = MSG_FILTER_BY_MSG_TYPE;
    filter.filterValue = (unsigned char*)malloc(sizeof(MSG_MESSAGE_TYPE_S));

    MSG_MESSAGE_TYPE_S* msgType = (MSG_MESSAGE_TYPE_S*)filter.filterValue;
    msgType->mainType = MSG_MESSAGE_TYPE_SMS;
    msgType->subType = MSG_MESSAGE_TYPE_SMS_TEXT;

    //set the filter
    ...
    ...
    //the session will only receive SMS.
Enumerator:
MSG_FILTER_BY_UNKNOWN  Unknown sort type.
MSG_FILTER_BY_MSG_TYPE  The messages whose message type are filterValue will be filtered out. filterValue should be MSG_MESSAGE_TYPE_S type.
MSG_FILTER_BY_FROM  The messages that come from filterValue will be filtered out. filterValue should be char * type, which is encoded in ASCII.
MSG_FILTER_BY_HAS_ATTACHMENT  Filter by whether the message has attachment.

If filterValue is set 0, the messages that do not has attachment will be filtered out.
If filterValue is set 1, the messages that have attachment will be filtered out.

MSG_FILTER_BY_HAS_DRM_CONTENT  Filter by whether the message has DRM content.

If filterValue is set 0, the messages that do not has DRM content will be filtered out.
If filterValue is set 1, the messages that have DRM content will be filtered out.

MSG_FILTER_BY_SIZE_GT  The messages whose size are greater than or equal the filterValue will be filtered out. filterValue should be size_t type
MSG_FILTER_BY_SIZE_LT  The messages whose size are less than or equal the filterValue will be filtered out. filterValue should be size_t type
MSG_FILTER_BY_PRIORITY_GT  The messages whose priority are greater than or equal the filterValue will be filtered out. filterValue should be MSG_MESSAGE_PRIORITY_T type.
MSG_FILTER_BY_PRIORITY_LT  The messages whose priority are less than or equal the filterValue will be filtered out. filterValue should be MSG_MESSAGE_PRIORITY_T type.
MSG_FILTER_BY_USER_DEF_BEGIN  User defined filter type begin value.


Generated on Mon Mar 31 01:01:00 2008 by  doxygen 1.5.4