email_plat/nmail_client_api/nmapicommon.h
changeset 75 47d84de1c893
parent 23 2dc6caa42ec3
equal deleted inserted replaced
72:64e38f08e49c 75:47d84de1c893
    27      */
    27      */
    28     enum NmApiMailboxEvent
    28     enum NmApiMailboxEvent
    29     {
    29     {
    30         MailboxCreated, MailboxDeleted
    30         MailboxCreated, MailboxDeleted
    31     };
    31     };
    32     
    32 
       
    33     /*!
       
    34         Email to message priority
       
    35      */
       
    36     enum NmApiMessagePriority
       
    37     {
       
    38         NmApiMessagePriorityLow,
       
    39         NmApiMessagePriorityNormal,
       
    40         NmApiMessagePriorityHigh
       
    41     };
       
    42 
       
    43     /*!
       
    44         Enum to message flags
       
    45      */
       
    46     enum NmApiMessageFlag 
       
    47     {
       
    48         NmApiMessageFlagRead = 1,
       
    49         NmApiMessageFlagReadLocally = 2,
       
    50         NmApiMessageFlagLow = 4,
       
    51         NmApiMessageFlagImportant = 8,
       
    52         NmApiMessageFlagFollowUpComplete = 16,
       
    53         NmApiMessageFlagFollowUp = 32,
       
    54         NmApiMessageFlagAttachments = 64,
       
    55         NmApiMessageFlagMultiple = 128,
       
    56         NmApiMessageFlagCalendarMsg = 256,
       
    57         NmApiMessageFlagAnswered = 512,
       
    58         NmApiMessageFlagForwarded = 1024,
       
    59         NmApiMessageFlagOnlyToMe = 2048,
       
    60         NmApiMessageFlagRemoteDeleted = 4096,
       
    61         NmApiMessageFlagHasMsgSender = 8192
       
    62     };
       
    63     Q_DECLARE_FLAGS(NmApiMessageFlags, NmApiMessageFlag)
       
    64     Q_DECLARE_OPERATORS_FOR_FLAGS(NmApiMessageFlags)
       
    65 
    33     /*!
    66     /*!
    34        Enum to describe message events.
    67        Enum to describe message events.
    35      */
    68      */
    36     enum NmApiMessageEvent 
    69     enum NmApiMessageEvent 
    37     {
    70     {
    45      */
    78      */
    46     enum NmApiEmailFolderType
    79     enum NmApiEmailFolderType
    47     {
    80     {
    48         Inbox, Drafts, Outbox, Sent, Deleted, EOther
    81         Inbox, Drafts, Outbox, Sent, Deleted, EOther
    49     };
    82     };
       
    83 
       
    84     /*!
       
    85         Email list sorting options
       
    86      */
       
    87     enum NmApiMailSortField
       
    88         {
       
    89         MailDontCare,            // user accepts any sort order
       
    90         MailSortByDate,          // sorting is done by date
       
    91         MailSortBySender,        // sorting is done by sender
       
    92         MailSortByRecipient,     // sorting is done by recipients
       
    93         MailSortBySubject,       // sorting is done by subject
       
    94         MailSortByPriority,      // sorting is done by priority
       
    95         MailSortByFlagStatus,    // follow up and completed   
       
    96         MailSortByUnread,        // sorting is based on unread
       
    97         MailSortBySize,          // sorting is done by size
       
    98         MailSortByAttachment     // sorting is based on if message has attachments
       
    99         };
       
   100 
       
   101     /*!
       
   102         Email list sort order
       
   103      */
       
   104     enum NmApiMailSortOrder
       
   105         {
       
   106         MailDescending,
       
   107         MailAscending    
       
   108         };
       
   109 
    50     
   110     
    51     /*!
   111     /*!
    52        Enum to describe error types
   112        Enum to describe error types
    53      */
   113      */
    54     enum NmApiError
   114     enum NmApiError
    55     {
   115     {
    56         GeneralError = -1, NotSupportedError
   116         GeneralError = -1, NotSupportedError
    57     };
   117     };
    58     
   118     
       
   119     /*!
       
   120         Sort criteria definion Class for searching email messages
       
   121      */
       
   122     class NmApiMailSortCriteria 
       
   123         {
       
   124         public:
       
   125             NmApiMailSortField iField;
       
   126             NmApiMailSortOrder iOrder;
       
   127         };
       
   128     
       
   129     /*!
       
   130         NmApi error codes
       
   131     */
       
   132     const int NmApiNoError = 0;
       
   133     const int NmApiNotFoundError = -1;
       
   134     const int NmApiGeneralError = -2;
       
   135     const int NmApiCancelError = -3;
       
   136     
       
   137     /*!
       
   138         NmApi predefined constants for ContentTypes
       
   139     */
       
   140     const QString NmApiContentTypeMultipartMixed = "multipart/mixed";
       
   141     const QString NmApiContentTypeMultipartAlternative = "multipart/alternative";
       
   142     const QString NmApiContentTypeMultipartDigest = "multipart/digest";
       
   143     const QString NmApiContentTypeMultipartParallel = "multipart/parallel";
       
   144     const QString NmApiContentTypeMultipartRelated =  "multipart/related";
       
   145     const QString NmApiContentTypeTextPlain = "text/plain";
       
   146     const QString NmApiContentTypeTextHtml = "text/html";
       
   147     const QString NmApiContentTypeTypeMessage = "message/rfc822";
       
   148     const QString NmApiContentTypeParamName = " name=";
       
   149     const QString NmApiContentTypeParamCharset = " charset=";
    59 }
   150 }
    60 Q_DECLARE_METATYPE (EmailClientApi::NmApiMailboxEvent)
   151 Q_DECLARE_METATYPE (EmailClientApi::NmApiMailboxEvent)
    61 Q_DECLARE_METATYPE(EmailClientApi::NmApiMessageEvent)
   152 Q_DECLARE_METATYPE(EmailClientApi::NmApiMessageEvent)
    62 Q_DECLARE_METATYPE (EmailClientApi::NmApiEmailFolderType)
   153 Q_DECLARE_METATYPE (EmailClientApi::NmApiEmailFolderType)
    63 Q_DECLARE_METATYPE (EmailClientApi::NmApiError)
   154 Q_DECLARE_METATYPE (EmailClientApi::NmApiError)