Modify flora license version.
[platform/core/messaging/msg-service.git] / include / common / MsgStorageTypes.h
1 /*
2 * Copyright 2012-2013  Samsung Electronics Co., Ltd
3 *
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *    http://floralicense.org/license/
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef MSG_STORAGE_TYPES_H
18 #define MSG_STORAGE_TYPES_H
19
20
21 /**
22  *      @file           MsgStorageTypes.h
23  *      @brief          Defines transport types of messaging framework
24  *      @version        1.0
25  */
26
27
28 /**
29  *      @section                Introduction
30  *      - Introduction : Overview on Messaging Storage Types
31  *      @section                Program
32  *      - Program : Messaging Storage Types Reference
33  */
34
35 /*==================================================================================================
36                                          INCLUDE FILES
37 ==================================================================================================*/
38 #include <time.h>
39
40 #include "MsgTypes.h"
41
42 #include "msg_storage_types.h"
43
44
45 /**
46  *      @ingroup                MESSAGING_FRAMEWORK
47  *      @defgroup       MESSAGING_STORAGE_TYPES Messaging Storage Types
48  *      @{
49  */
50 /*==================================================================================================
51                                          STRUCTURES
52 ==================================================================================================*/
53
54 /**
55  *      @brief  Represents the count of read/unread messages.
56  */
57 typedef struct
58 {
59         int     nReadCnt;               /**< The count of read messages */
60         int     nUnreadCnt;             /**< The count of unread messages */
61         int     nSms;                   /**< The count of sms type messages */
62         int     nMms;                   /**< The count of mms type messages */
63 } MSG_COUNT_INFO_S;
64
65
66 /**
67  *      @brief  Represents a reject message information.
68  */
69 typedef struct
70 {
71         msg_message_id_t                msgId;                  /**< Indicates the unique message ID. */
72         char                                            msgText[MAX_MSG_TEXT_LEN+1];    /**< Indicates the message text. */
73         time_t                                  displayTime;
74 } MSG_REJECT_MSG_INFO_S;
75
76
77 /**
78  *      @brief  Represents folder information.
79  */
80 typedef struct
81 {
82         msg_folder_id_t         folderId;                       /**< Indicates the unique folder ID. */
83         char                            folderName[MAX_FOLDER_NAME_SIZE+1];     /**< Indicates the name of the folder. */
84         msg_folder_type_t       folderType;             /**< Indicates the folder type. */
85 } MSG_FOLDER_INFO_S;
86
87
88 /**
89  *      @brief  Represents contact information.
90  */
91 typedef struct
92 {
93         msg_contact_id_t        contactId;                                                      /**< Indicates the unique contact ID. */
94         char                            firstName[MAX_DISPLAY_NAME_LEN+1];              /**< Indicates the first name of contact. */
95         char                            lastName[MAX_DISPLAY_NAME_LEN+1];               /**< Indicates the last name of contact. */
96         char                            imagePath[MAX_IMAGE_PATH_LEN+1];                /**< Indicates the image path of contact. */
97 } MSG_CONTACT_INFO_S;
98
99
100 /**
101  *      @brief  Represents a sort rule. \n
102  *      The sort rule structure includes a sort type and a sort order. \n
103  *      Applications can use the sort rule when querying messages.
104  */
105 typedef struct
106 {
107         msg_sort_type_t sortType;               /**< Indicates the sort type */
108         bool                                    bAscending;             /**< Indicates the sort order which is ascending or descending */
109 }MSG_SORT_RULE_S;
110
111
112 /**
113  *      @brief  Represents SIM ID List.
114  */
115 typedef struct
116 {
117         unsigned int            count;                                                                          /**< The total number of SIM Msg ID*/
118         msg_sim_id_t    simId[MAX_SEGMENT_NUM];                                         /**< The SIM Msg ID List */
119 } SMS_SIM_ID_LIST_S;
120
121
122 /**
123  *      @brief  Represents recipien list information.
124  */
125 typedef struct
126 {
127         int                                             recipientCnt;
128         MSG_ADDRESS_INFO_S*     recipientAddr;
129 } MSG_RECIPIENTS_LIST_S;
130
131
132 /**
133  *      @brief  Represents search condition values.
134  */
135 typedef struct
136 {
137         msg_folder_id_t         folderId;
138         msg_message_type_t              msgType;
139         char                                            *pAddressVal;
140         char                                            *pSearchVal;
141         int                                             reserved;
142 } MSG_SEARCH_CONDITION_S;
143
144
145 typedef struct
146 {
147         int appcode;
148         char appid[MAX_WAPPUSH_ID_LEN];
149 } PUSH_APPLICATION_INFO_S;
150
151 #endif // MSG_STORAGE_TYPES_H
152