summaryrefslogtreecommitdiff
path: root/include/common/MsgStorageTypes.h
blob: 5a74993f861df01120112b888af191f35a5326c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
* Copyright 2012-2013  Samsung Electronics Co., Ltd
*
* Licensed under the Flora License, Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*    http://floralicense.org
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#ifndef MSG_STORAGE_TYPES_H
#define MSG_STORAGE_TYPES_H


/**
 *	@file 		MsgStorageTypes.h
 *	@brief 		Defines transport types of messaging framework
 *	@version 	1.0
 */


/**
 *	@section		Introduction
 *	- Introduction : Overview on Messaging Storage Types
 *	@section		Program
 *	- Program : Messaging Storage Types Reference
 */

/*==================================================================================================
                                         INCLUDE FILES
==================================================================================================*/
#include <time.h>

#include "MsgTypes.h"

#include "msg_storage_types.h"


/**
 *	@ingroup		MESSAGING_FRAMEWORK
 *	@defgroup	MESSAGING_STORAGE_TYPES	Messaging Storage Types
 *	@{
 */
/*==================================================================================================
                                         STRUCTURES
==================================================================================================*/

/**
 *	@brief	Represents the count of read/unread messages.
 */
typedef struct
{
	int	nReadCnt;		/**< The count of read messages */
	int	nUnreadCnt;		/**< The count of unread messages */
	int	nSms;			/**< The count of sms type messages */
	int	nMms;			/**< The count of mms type messages */
} MSG_COUNT_INFO_S;


/**
 *	@brief	Represents a reject message information.
 */
typedef struct
{
	msg_message_id_t		msgId;      		/**< Indicates the unique message ID. */
	char						msgText[MAX_MSG_TEXT_LEN+1];	/**< Indicates the message text. */
	time_t					displayTime;
} MSG_REJECT_MSG_INFO_S;


/**
 *	@brief	Represents folder information.
 */
typedef struct
{
	msg_folder_id_t 	folderId;			/**< Indicates the unique folder ID. */
	char 				folderName[MAX_FOLDER_NAME_SIZE+1];	/**< Indicates the name of the folder. */
	msg_folder_type_t	folderType;		/**< Indicates the folder type. */
} MSG_FOLDER_INFO_S;


/**
 *	@brief	Represents contact information.
 */
typedef struct
{
	msg_contact_id_t	contactId;							/**< Indicates the unique contact ID. */
	char 				firstName[MAX_DISPLAY_NAME_LEN+1];		/**< Indicates the first name of contact. */
	char 				lastName[MAX_DISPLAY_NAME_LEN+1];		/**< Indicates the last name of contact. */
	char 				imagePath[MAX_IMAGE_PATH_LEN+1];		/**< Indicates the image path of contact. */
} MSG_CONTACT_INFO_S;


/**
 *	@brief	Represents a sort rule. \n
 *	The sort rule structure includes a sort type and a sort order. \n
 *	Applications can use the sort rule when querying messages.
 */
typedef struct
{
	msg_sort_type_t	sortType;		/**< Indicates the sort type */
	bool					bAscending;		/**< Indicates the sort order which is ascending or descending */
}MSG_SORT_RULE_S;


/**
 *	@brief	Represents SIM ID List.
 */
typedef struct
{
	unsigned int		count;										/**< The total number of SIM Msg ID*/
	msg_sim_id_t	simId[MAX_SEGMENT_NUM];						/**< The SIM Msg ID List */
} SMS_SIM_ID_LIST_S;


/**
 *	@brief	Represents recipien list information.
 */
typedef struct
{
	int						recipientCnt;
	MSG_ADDRESS_INFO_S*	recipientAddr;
} MSG_RECIPIENTS_LIST_S;


/**
 *	@brief	Represents search condition values.
 */
typedef struct
{
	msg_folder_id_t		folderId;
	msg_message_type_t		msgType;
	char						*pAddressVal;
	char						*pSearchVal;
	int						reserved;
} MSG_SEARCH_CONDITION_S;


typedef struct
{
	int appcode;
	char appid[MAX_WAPPUSH_ID_LEN];
} PUSH_APPLICATION_INFO_S;

#endif // MSG_STORAGE_TYPES_H