summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChangseok Oh <seok.oh@samsung.com>2012-10-09 17:37:37 +0900
committerChangseok Oh <seok.oh@samsung.com>2012-10-09 18:57:15 +0900
commit114f168b55d684805732268dbb528c0236f0c4e7 (patch)
tree7e8c22519b190b0c3ca616fa90c439331217b645 /include
parent81675912331f540b11a43fb5affa82524bee0d7d (diff)
downloadmsg-service-114f168b55d684805732268dbb528c0236f0c4e7.tar.gz
msg-service-114f168b55d684805732268dbb528c0236f0c4e7.tar.bz2
msg-service-114f168b55d684805732268dbb528c0236f0c4e7.zip
apply push/cb function
Diffstat (limited to 'include')
-rwxr-xr-xinclude/common/MsgCmdTypes.h16
-rwxr-xr-xinclude/common/MsgInternalTypes.h45
-rwxr-xr-xinclude/common/MsgPluginInterface.h4
-rwxr-xr-xinclude/common/MsgStorageTypes.h6
-rwxr-xr-xinclude/common/MsgTypes.h15
-rwxr-xr-xinclude/framework/MsgCmdHandler.h7
-rwxr-xr-xinclude/framework/MsgStorageHandler.h4
-rwxr-xr-xinclude/framework/MsgTransManager.h8
-rwxr-xr-xinclude/mapi/msg_private.h10
-rwxr-xr-xinclude/mapi/msg_storage.h5
-rwxr-xr-xinclude/mapi/msg_transport.h4
-rwxr-xr-xinclude/mapi/msg_transport_types.h4
-rwxr-xr-xinclude/mapi/msg_types.h31
-rwxr-xr-xinclude/proxy/MsgHandle.h7
-rwxr-xr-xinclude/proxy/MsgProxyListener.h22
-rwxr-xr-xinclude/utils/MsgSqliteWrapper.h1
16 files changed, 183 insertions, 6 deletions
diff --git a/include/common/MsgCmdTypes.h b/include/common/MsgCmdTypes.h
index 4439c7b..c20ca3d 100755
--- a/include/common/MsgCmdTypes.h
+++ b/include/common/MsgCmdTypes.h
@@ -159,6 +159,14 @@ enum _MSG_CMD_TYPE_E
MSG_CMD_SET_GENERAL_MSG_OPT,
MSG_CMD_SET_MSG_SIZE_OPT,
+ MSG_CMD_REG_INCOMING_PUSH_MSG_CB,
+ MSG_CMD_PLG_INCOMING_PUSH_IND,
+ MSG_CMD_REG_INCOMING_CB_MSG_CB,
+ MSG_CMD_PLG_INCOMING_CB_IND,
+ MSG_CMD_ADD_PUSH_EVENT,
+ MSG_CMD_DELETE_PUSH_EVENT,
+ MSG_CMD_UPDATE_PUSH_EVENT,
+
// end of MSG_CMD; new CMD should be defined before MSG_CMD_NUM
MSG_CMD_NUM
};
@@ -262,6 +270,14 @@ enum _MSG_EVENT_TYPE_E
MSG_EVENT_SET_VOICE_MSG_OPT,
MSG_EVENT_SET_GENERAL_MSG_OPT,
MSG_EVENT_SET_MSG_SIZE_OPT,
+ MSG_EVENT_REG_INCOMING_PUSH_MSG_CB,
+ MSG_EVENT_PLG_INCOMING_PUSH_MSG_IND,
+ MSG_EVENT_REG_INCOMING_CB_MSG_CB,
+ MSG_EVENT_PLG_INCOMING_CB_MSG_IND,
+ MSG_EVENT_ADD_PUSH_EVENT,
+
+ MSG_EVENT_DELETE_PUSH_EVENT,
+ MSG_EVENT_UPDATE_PUSH_EVENT,
// end of MSG_EVENT; new EVENT should be defined before MSG_EVENT_NUM
MSG_EVENT_NUM
diff --git a/include/common/MsgInternalTypes.h b/include/common/MsgInternalTypes.h
index cb208ea..edeadf8 100755
--- a/include/common/MsgInternalTypes.h
+++ b/include/common/MsgInternalTypes.h
@@ -43,6 +43,8 @@
#define MAX_THREAD_ADDR_LEN 40
#define MAX_THREAD_NAME_LEN 195
#define MAX_THREAD_DATA_LEN 128
+#define MAX_CB_MSG_TEXT_LEN 4200 // 1page max char(93)*max page(15)*max bytes of UTF8 1 char(3)
+#define MAX_ETWS_WARNING_SECURITY_INFO_LEN 50
#define SMS_MINIMUM_SPACE (3 * 1024)
#define MMS_MINIMUM_SPACE (600 * 1024)
@@ -131,7 +133,7 @@
#define PUSH_SERVICE_TYPE DEFAULT_PUSH_MSG_OPT_PATH"/service_load"
#define CB_RECEIVE DEFAULT_CB_MSG_OPT_PATH"/receive"
-#define CB_ALL_CHANNEL DEFAULT_CB_MSG_OPT_PATH"/all_channel"
+#define CB_SAVE DEFAULT_CB_MSG_OPT_PATH"/save"
#define CB_MAX_SIM_COUNT DEFAULT_CB_MSG_OPT_PATH"/max_sim_count"
#define CB_CHANNEL_COUNT DEFAULT_CB_MSG_OPT_PATH"/channel_count"
#define CB_CHANNEL_ACTIVATE DEFAULT_CB_MSG_OPT_PATH"/channel_activate"
@@ -323,6 +325,13 @@ typedef struct
unsigned short port;
} MSG_CMD_REG_INCOMING_MSG_CB_S;
+typedef struct
+{
+ int listenerFd;
+ MSG_MAIN_TYPE_T msgType;
+ bool bsave;
+} MSG_CMD_REG_CB_INCOMING_MSG_CB_S;
+
/**
* @brief Aux data structure for MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB. \n
@@ -380,6 +389,20 @@ typedef struct
MSG_MAIN_TYPE_T msgType;
} MSG_CMD_REG_SYNCML_MSG_OPERATION_CB_S;
+typedef struct
+{
+ int listenerFd;
+ MSG_MAIN_TYPE_T msgType;
+ char appId[MAX_WAPPUSH_ID_LEN+1];
+} MSG_CMD_REG_INCOMING_PUSH_MSG_CB_S;
+
+typedef struct
+{
+ int listenerFd;
+ MSG_MAIN_TYPE_T msgType;
+ bool bsave;
+} MSG_CMD_REG_INCOMING_CB_MSG_CB_S;
+
typedef struct
{
@@ -387,6 +410,24 @@ typedef struct
MSG_REQUEST_INFO_S reqInfo;
}MSG_SCHEDULED_MSG_S;
+/**
+ * @brief Represents a CB message in the framework.
+ */
+typedef struct
+{
+ MSG_SUB_TYPE_T type;
+ time_t receivedTime;
+
+ unsigned short serialNum;
+ unsigned short messageId; // Message Identifier
+ unsigned char dcs; // data coding scheme
+ int cbTextLen; // length of cbText
+ unsigned char cbText[MAX_CB_MSG_TEXT_LEN];// cb message text (UTF8)
+
+ unsigned short etwsWarningType;
+ unsigned char etwsWarningSecurityInfo[MAX_ETWS_WARNING_SECURITY_INFO_LEN];
+} MSG_CB_MSG_S;
+
/*==================================================================================================
ENUMS
@@ -455,6 +496,8 @@ enum _MSG_SUB_TYPE_E
MSG_FORWARDCONF_MMS, /**< MMS Forward Confirm message */
MSG_READREPLY_MMS, /**< MMS Read Reply message */
MSG_SENDREQ_JAVA_MMS, /**< MMS Send Request message for JAVA MMS */
+
+ MSG_ETWS_SMS,
};
/**
diff --git a/include/common/MsgPluginInterface.h b/include/common/MsgPluginInterface.h
index efdf960..02cef24 100755
--- a/include/common/MsgPluginInterface.h
+++ b/include/common/MsgPluginInterface.h
@@ -1043,6 +1043,8 @@ typedef msg_error_t (*MsgPlgOnMsgIncoming)(MSG_MESSAGE_INFO_S *pMsgInfo);
typedef msg_error_t (*MsgPlgOnInitSimBySat)(void);
typedef msg_error_t (*MsgPlgOnSyncMLMsgIncoming)(MSG_SYNCML_MESSAGE_DATA_S *pSyncMLData);
typedef msg_error_t (*MsgPlgOnLBSMsgIncoming)(MSG_LBS_MESSAGE_DATA_S *pLBSData);
+typedef msg_error_t (*MsgPlgOnPushMsgIncoming)(MSG_PUSH_MESSAGE_DATA_S *pPushData);
+typedef msg_error_t (*MsgPlgOnCBMsgIncoming)(MSG_CB_MSG_S *pCbMsg);
typedef msg_error_t (*MsgPlgOnMmsConfIncoming)(MSG_MESSAGE_INFO_S *pMsgInfo, msg_request_id_t *pRequest);
@@ -1057,6 +1059,8 @@ struct _MSG_PLUGIN_LISTENER_S
MsgPlgOnInitSimBySat pfInitSimBySatCb; /** The function pointer of init SIM callback. */
MsgPlgOnSyncMLMsgIncoming pfSyncMLMsgIncomingCb; /** The function pointer of receive syncML message callback. */
MsgPlgOnLBSMsgIncoming pfLBSMsgIncomingCb; /** The function pointer of receive LBS message callback. */
+ MsgPlgOnPushMsgIncoming pfPushMsgIncomingCb; /** The function pointer of receive Push message callback. */
+ MsgPlgOnCBMsgIncoming pfCBMsgIncomingCb; /** The function pointer of receive cb message callback. */
MsgPlgOnMmsConfIncoming pfMmsConfIncomingCb; /** The function pointer of receive MMS conf */
};
diff --git a/include/common/MsgStorageTypes.h b/include/common/MsgStorageTypes.h
index aef5f1e..5d3c88f 100755
--- a/include/common/MsgStorageTypes.h
+++ b/include/common/MsgStorageTypes.h
@@ -150,5 +150,11 @@ typedef struct
} MSG_SEARCH_CONDITION_S;
+typedef struct
+{
+ int appcode;
+ char appid[MAX_WAPPUSH_ID_LEN];
+} PUSH_APPLICATION_INFO_S;
+
#endif // MSG_STORAGE_TYPES_H
diff --git a/include/common/MsgTypes.h b/include/common/MsgTypes.h
index fd33621..2037e62 100755
--- a/include/common/MsgTypes.h
+++ b/include/common/MsgTypes.h
@@ -300,6 +300,14 @@ typedef struct
}MSG_LBS_MESSAGE_DATA_S;
+typedef struct
+{
+ char pushHeader[MAX_WAPPUSH_CONTENTS_LEN];
+ int pushBodyLen;
+ char pushBody[MAX_WAPPUSH_CONTENTS_LEN];
+ char pushAppId[MAX_WAPPUSH_ID_LEN];
+}MSG_PUSH_MESSAGE_DATA_S;
+
/**
* @brief Represents the Report Status Data.
*/
@@ -311,6 +319,13 @@ typedef struct
time_t readStatusTime; /**< Indicates the display time related to the specific operation. */ //MAX_DISPLAY_TIME_LEN
}MSG_REPORT_STATUS_INFO_S;
+typedef struct
+{
+ char contentType[MAX_WAPPUSH_CONTENT_TYPE_LEN];
+ char appId[MAX_WAPPUSH_ID_LEN];
+ char pkgName[MSG_FILEPATH_LEN_MAX];
+ bool bLaunch;
+}MSG_PUSH_EVENT_INFO_S;
/**
* @}
diff --git a/include/framework/MsgCmdHandler.h b/include/framework/MsgCmdHandler.h
index 1906581..e76ebb4 100755
--- a/include/framework/MsgCmdHandler.h
+++ b/include/framework/MsgCmdHandler.h
@@ -74,6 +74,8 @@ int MsgCancelReqHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgRegSentStatusCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgRegIncomingMsgCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgRegIncomingMMSConfMsgCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent);
+int MsgRegIncomingPushMsgCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent);
+int MsgRegIncomingCBMsgCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgRegIncomingSyncMLMsgCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgRegIncomingLBSMsgCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgRegSyncMLMsgOperationCallbackHandler(const MSG_CMD_S *pCmd, char **ppEvent);
@@ -82,6 +84,8 @@ int MsgStorageChangeHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgSentStatusHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgIncomingMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent);
+int MsgIncomingPushMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent);
+int MsgIncomingCBMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgIncomingSyncMLMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgIncomingLBSMsgHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgSyncMLMsgOperationHandler(const MSG_CMD_S *pCmd, char **ppEvent);
@@ -93,6 +97,9 @@ int MsgDeleteFilterHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgGetFilterListHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgSetFilterOperationHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgGetFilterOperationHandler(const MSG_CMD_S *pCmd, char **ppEvent);
+int MsgAddPushEventHandler(const MSG_CMD_S *pCmd, char **ppEvent);
+int MsgDeletePushEventHandler(const MSG_CMD_S *pCmd, char **ppEvent);
+int MsgUpdatePushEventHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgGetSMSCListHandler(const MSG_CMD_S *pCmd, char **ppEvent);
int MsgGetCBInfoHandler(const MSG_CMD_S *pCmd, char **ppEvent);
diff --git a/include/framework/MsgStorageHandler.h b/include/framework/MsgStorageHandler.h
index 68d97fd..fe541b2 100755
--- a/include/framework/MsgStorageHandler.h
+++ b/include/framework/MsgStorageHandler.h
@@ -129,5 +129,9 @@ msg_error_t MsgStoResetNetworkStatus();
msg_error_t MsgStoCleanAbnormalMmsData();
msg_error_t MsgStoCheckReadReportStatus(msg_message_id_t msgId);
+msg_error_t MsgStoAddPushEvent(MSG_PUSH_EVENT_INFO_S* pPushEvent);
+msg_error_t MsgStoDeletePushEvent(MSG_PUSH_EVENT_INFO_S* pPushEvent);
+msg_error_t MsgStoUpdatePushEvent(MSG_PUSH_EVENT_INFO_S* pSrc, MSG_PUSH_EVENT_INFO_S* pDst);
+
#endif // MSG_STORAGE_HANDLER_H
diff --git a/include/framework/MsgTransManager.h b/include/framework/MsgTransManager.h
index 554b7d6..53f7ba4 100755
--- a/include/framework/MsgTransManager.h
+++ b/include/framework/MsgTransManager.h
@@ -40,6 +40,8 @@ typedef std::map<int, MSG_PROXY_INFO_S> sentmsg_map;
typedef std::map<int, bool> fd_map;
typedef std::list<MSG_CMD_REG_INCOMING_MSG_CB_S> newmsg_list;
typedef std::list<MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB_S> mmsconf_list;
+typedef std::list<MSG_CMD_REG_INCOMING_PUSH_MSG_CB_S> pushmsg_list;
+typedef std::list<MSG_CMD_REG_INCOMING_CB_MSG_CB_S> cbmsg_list;
typedef std::list<MSG_CMD_REG_INCOMING_SYNCML_MSG_CB_S> syncmlmsg_list;
typedef std::list<MSG_CMD_REG_INCOMING_LBS_MSG_CB_S> lbsmsg_list;
typedef std::list<MSG_CMD_REG_INCOMING_JAVAMMS_TRID_S> javamms_list;
@@ -70,6 +72,8 @@ public:
void setSentStatusCB(int listenerFd);
void setIncomingMsgCB(MSG_CMD_REG_INCOMING_MSG_CB_S *pCbInfo);
void setMMSConfMsgCB(MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB_S *pCbinfo);
+ void setPushMsgCB(MSG_CMD_REG_INCOMING_PUSH_MSG_CB_S *pCbinfo);
+ void setCBMsgCB(MSG_CMD_REG_INCOMING_CB_MSG_CB_S *pCbInfo);
void setSyncMLMsgCB(MSG_CMD_REG_INCOMING_SYNCML_MSG_CB_S *pCbinfo);
void setLBSMsgCB(MSG_CMD_REG_INCOMING_LBS_MSG_CB_S *pCbinfo);
void setJavaMMSList(MSG_CMD_REG_INCOMING_JAVAMMS_TRID_S *pTrId);
@@ -80,6 +84,8 @@ public:
void broadcastIncomingMsgCB(const msg_error_t err, const MSG_MESSAGE_INFO_S *msgInfo);
void broadcastMMSConfCB(const msg_error_t err, const MSG_MESSAGE_INFO_S *msgInfo, const MMS_RECV_DATA_S *mmsRecvData);
+ void broadcastPushMsgCB(const msg_error_t err, const MSG_PUSH_MESSAGE_DATA_S *pushData);
+ void broadcastCBMsgCB(const msg_error_t err, const MSG_CB_MSG_S *cbMsg);
void broadcastSyncMLMsgCB(const msg_error_t err, const MSG_SYNCML_MESSAGE_DATA_S *syncMLData);
void broadcastLBSMsgCB(const msg_error_t err, const MSG_LBS_MESSAGE_DATA_S *lbsData);
void broadcastSyncMLMsgOperationCB(const msg_error_t err, const int msgId, const int extId);
@@ -108,6 +114,8 @@ private:
newmsg_list newMsgCBList; // src_fd, msgType, port if registered
mmsconf_list newMMSConfMsgCBList; // src_fd, msgType, port if registered
+ pushmsg_list newPushMsgCBList; // src_fd, msgType, port if registered
+ cbmsg_list newCBMsgCBList; // src_fd, msgType, port if registered
syncmlmsg_list newSyncMLMsgCBList; // src_fd, msgType, port if registered
lbsmsg_list newLBSMsgCBList; // src_fd, msgType, port if registered
javamms_list javaMMSList; // trId list to distinguish sent Java MMS msg when sendconf received
diff --git a/include/mapi/msg_private.h b/include/mapi/msg_private.h
index 13e0312..b6771e4 100755
--- a/include/mapi/msg_private.h
+++ b/include/mapi/msg_private.h
@@ -50,6 +50,11 @@ int msg_message_set_struct_hnd(void *data, int field, void *value);
void msg_message_copy_message(MSG_MESSAGE_HIDDEN_S *pSrc, MSG_MESSAGE_HIDDEN_S *pDst);
+int msg_cb_message_get_int_value(void *data, int field, int *value);
+int msg_cb_message_get_str_value(void *data, int field, char *value, int size);
+
+
+
// filter
int msg_get_filter_info_int(void *filter, int field);
@@ -142,6 +147,11 @@ int msg_set_general_opt_bool(void *general_opt, int field, bool value);
int msg_get_msgsize_opt_int(void *size_opt, int field);
int msg_set_msgsize_opt_int(void *size_opt, int field, int value);
+/* Wap Push */
+char* msg_push_config_get_str(void *event_info, int field, int size);
+bool msg_push_config_get_bool(void *event_info, int field);
+int msg_push_config_set_str(void *event_info, int field, char *value, int size);
+int msg_push_config_set_bool(void *event, int field, bool value);
/* added internal apis for new managed api (storage) */
int msg_syncml_info_get_int(void *syncml_info, int field);
int msg_count_info_get_int(void *count_info, int field);
diff --git a/include/mapi/msg_storage.h b/include/mapi/msg_storage.h
index 796f70f..0c2300d 100755
--- a/include/mapi/msg_storage.h
+++ b/include/mapi/msg_storage.h
@@ -2094,6 +2094,11 @@ int msg_get_thread(msg_handle_t handle, msg_thread_id_t thread_id, msg_struct_t
int msg_get_message_list(msg_handle_t handle, msg_folder_id_t folder_id, msg_thread_id_t thread_id, msg_message_type_t msg_type, msg_storage_id_t storage_id, msg_struct_list_s *msg_list);
+int msg_add_push_event(msg_handle_t handle, const msg_struct_t push_event);
+
+int msg_delete_push_event(msg_handle_t handle, const msg_struct_t push_event);
+
+int msg_update_push_event(msg_handle_t handle, const msg_struct_t src_event, const msg_struct_t dst_event);
/**
* @}
*/
diff --git a/include/mapi/msg_transport.h b/include/mapi/msg_transport.h
index f5b9e0d..522fe1a 100755
--- a/include/mapi/msg_transport.h
+++ b/include/mapi/msg_transport.h
@@ -503,6 +503,10 @@ int msg_reg_lbs_message_callback(msg_handle_t handle, msg_lbs_msg_incoming_cb cb
int msg_reg_syncml_message_operation_callback(msg_handle_t handle, msg_syncml_msg_operation_cb cb, void *user_param);
+int msg_reg_push_message_callback(msg_handle_t handle, msg_push_msg_incoming_cb cb, const char *app_id, void *user_param);
+
+int msg_reg_cb_message_callback(msg_handle_t handle, msg_cb_incoming_cb cb, bool bsave, void *user_param);
+
/**
* \par Description:
diff --git a/include/mapi/msg_transport_types.h b/include/mapi/msg_transport_types.h
index 58229a5..db2b2b5 100755
--- a/include/mapi/msg_transport_types.h
+++ b/include/mapi/msg_transport_types.h
@@ -128,5 +128,9 @@ typedef void (*msg_lbs_msg_incoming_cb)(msg_handle_t handle, const char *push_he
typedef void (*msg_syncml_msg_operation_cb)(msg_handle_t handle, int msgId, int extId, void *user_param);
+typedef void (*msg_push_msg_incoming_cb)(msg_handle_t handle, const char *push_header, const char *push_body, int push_body_len, void *user_param);
+
+
+typedef void (*msg_cb_incoming_cb)(msg_handle_t handle, msg_struct_t msg, void *user_param);
#endif /* MSG_TRANSPORT_TYPES_H_ */
diff --git a/include/mapi/msg_types.h b/include/mapi/msg_types.h
index 491c2f6..c2b067f 100755
--- a/include/mapi/msg_types.h
+++ b/include/mapi/msg_types.h
@@ -40,9 +40,10 @@
#define MAX_COMMAND_LEN 1024
#define MAX_FOLDER_NAME_SIZE 20
-#define MAX_WAPPUSH_ID_LEN 40
-#define MAX_WAPPUSH_HREF_LEN 300
-#define MAX_WAPPUSH_CONTENTS_LEN 2048
+#define MAX_WAPPUSH_ID_LEN 100
+#define MAX_WAPPUSH_CONTENT_TYPE_LEN 40
+#define MAX_WAPPUSH_HREF_LEN 300
+#define MAX_WAPPUSH_CONTENTS_LEN 2048
#define MAX_PUSH_CACHEOP_INVALID_OBJECT_MAX 5
#define MAX_PUSH_CACHEOP_INVALID_SERVICE_MAX 5
@@ -358,6 +359,8 @@ enum _MSG_STRUCT_E {
MSG_STRUCT_REJECT_MSG_INFO = 0x4400, /**< Indicates the MSG_STRUCT_REJECT_MSG_INFO */
MSG_STRUCT_REQUEST_INFO = 0x4500, /**< Indicates the MSG_STRUCT_REQUEST_INFO */
MSG_STRUCT_SENT_STATUS_INFO = 0x4600, /**< Indicates the MSG_STRUCT_SENT_STATUS_INFO */
+ MSG_STRUCT_PUSH_CONFIG_INFO = 0x4700, /**< Indicates the MSG_STRUCT_PUSH_CONFIG_INFO */
+ MSG_STRUCT_CB_MSG = 0x4800, /**< Indicates the MSG_STRUCT_PUSH_CONFIG_INFO */
};
enum _MSG_MESSAGE_INFO_E_ {
@@ -422,7 +425,6 @@ enum _MSG_STRUCT_SETTING_SMSC_INFO_E {
enum _MSG_STRUCT_CB_OPT_E {
MSG_CB_RECEIVE_BOOL = MSG_STRUCT_SETTING_CB_OPT+1, /**< Indicates whether the CB message is received or not. */
- MSG_CB_RECEIVE_ALL_CHANNEL_BOOL, /**< Indicates whether All Channel's CB message is received or not. */
MSG_CB_MAX_SIM_COUNT_INT, /**< Indicates the number of channels which can be stored in SIM. */
MSG_CB_CHANNEL_LIST_STRUCT, /**< Indicates the cell broadcasting channel information. */
MSG_CB_LANGUAGE_TYPE_ALL_BOOL,
@@ -696,6 +698,24 @@ enum MSG_SENT_STATUS_INFO_E {
MSG_SENT_STATUS_NETWORK_STATUS_INT, /**< Indicates the status of the corresponding request. Refer to enum _MSG_NETWORK_STATUS_E*/
};
+enum MSG_PUSH_CONFIG_INFO_E {
+ MSG_PUSH_CONFIG_CONTENT_TYPE_STR = MSG_STRUCT_PUSH_CONFIG_INFO+1,
+ MSG_PUSH_CONFIG_APPLICATON_ID_STR,
+ MSG_PUSH_CONFIG_PACKAGE_NAME_STR,
+ MSG_PUSH_CONFIG_LAUNCH_BOOL,
+};
+
+enum MSG_CB_MSG_E {
+ MSG_CB_MSG_TYPE_INT = MSG_STRUCT_CB_MSG+1, /**< MSG_TYPE_SMS_CB/ETWS_PRIMARY/ETWS_SECONDARY (see _MSG_MESSAGE_TYPE_E) */
+ MSG_CB_MSG_RECV_TIME_INT,
+ MSG_CB_MSG_SERIAL_NUM_INT, /**< serial number of CB/ETWS Primary Noti. : 2 bytes binary data */
+ MSG_CB_MSG_MSG_ID_INT, /**< message identifier of CB/ETWS Primary Noti. */
+ MSG_CB_MSG_DCS_INT, /**< Data coding scheme of CB MSG. */
+ MSG_CB_MSG_CB_TEXT_LEN_INT, /**< length of CB text (except NULL) */
+ MSG_CB_MSG_CB_TEXT_STR, /**< CB text */
+ MSG_CB_MSG_ETWS_WARNING_TYPE_INT, /**< warning type of ETWS Primary Noti. : 2 bytes binary data */
+ MSG_CB_MSG_ETWS_WARNING_SECU_INFO_STR, /**< warning security information of ETWS Primary Noti. : 50 bytes binary data */
+};
/**
* @brief Represents the values of a message class type. \n
@@ -728,6 +748,9 @@ enum _MSG_CLASS_TYPE_E
MSG_TYPE_MMS, /** < Normal MMS Message */
MSG_TYPE_MMS_JAVA, /** < JAVA MMS Message */
MSG_TYPE_MMS_NOTI, /** < MMS Notification Message */
+
+ MSG_TYPE_SMS_ETWS_PRIMARY, /** < CB - ETWS Primary Notification */
+ MSG_TYPE_SMS_ETWS_SECONDARY, /** < CB - ETWS Secondary Notification */
};
diff --git a/include/proxy/MsgHandle.h b/include/proxy/MsgHandle.h
index ff1d0fb..a8c0c26 100755
--- a/include/proxy/MsgHandle.h
+++ b/include/proxy/MsgHandle.h
@@ -55,7 +55,8 @@ class MsgHandle
msg_error_t regMmsConfMessageCallback(msg_mms_conf_msg_incoming_cb onMMSConfMsgIncoming, const char *pAppId, void *pUserParam);
msg_error_t regSyncMLMessageCallback(msg_syncml_msg_incoming_cb onSyncMLMsgIncoming, void *pUserParam);
msg_error_t regLBSMessageCallback(msg_lbs_msg_incoming_cb onLBSMsgIncoming, void *pUserParam);
-
+ msg_error_t regPushMessageCallback(msg_push_msg_incoming_cb onPushMsgIncoming, const char *pAppId, void *pUserParam);
+ msg_error_t regCBMessageCallback(msg_cb_incoming_cb onCBIncoming, bool bSave, void *pUserParam);
msg_error_t regSyncMLMessageOperationCallback(msg_syncml_msg_operation_cb onSyncMLMsgOperation, void *pUserParam);
msg_error_t operateSyncMLMessage(msg_message_id_t msgId);
@@ -130,6 +131,10 @@ class MsgHandle
msg_error_t getThreadIdByAddress(msg_struct_list_s *pAddrList, msg_thread_id_t *pThreadId);
msg_error_t getThread(msg_thread_id_t threadId, MSG_THREAD_VIEW_S* pThreadInfo);
msg_error_t getMessageList(msg_folder_id_t folderId, msg_thread_id_t threadId, msg_message_type_t msgType, msg_storage_id_t storageId, msg_struct_list_s *pMsgList);
+ // Push Event
+ msg_error_t addPushEvent(MSG_PUSH_EVENT_INFO_S *push_event);
+ msg_error_t deletePushEvent(MSG_PUSH_EVENT_INFO_S *push_event);
+ msg_error_t updatePushEvent(MSG_PUSH_EVENT_INFO_S *pSrc, MSG_PUSH_EVENT_INFO_S *pDst);
void convertMsgStruct(const MSG_MESSAGE_INFO_S *pSource, MSG_MESSAGE_HIDDEN_S *pDest);
void convertSendOptStruct(const MSG_SENDINGOPT_INFO_S* pSrc, MSG_SENDINGOPT_S* pDest, MSG_MESSAGE_TYPE_S msgType);
diff --git a/include/proxy/MsgProxyListener.h b/include/proxy/MsgProxyListener.h
index 53002cf..47385dd 100755
--- a/include/proxy/MsgProxyListener.h
+++ b/include/proxy/MsgProxyListener.h
@@ -60,6 +60,22 @@ typedef struct
typedef struct
{
MsgHandle* hAddr;
+ msg_push_msg_incoming_cb pfPushIncomingCB;
+ char appId[MAX_WAPPUSH_ID_LEN+1];
+ void* userParam;
+} MSG_PUSH_INCOMING_CB_ITEM_S;
+
+typedef struct
+{
+ MsgHandle* hAddr;
+ msg_cb_incoming_cb pfCBIncomingCB;
+ bool bsave;
+ void* userParam;
+} MSG_CB_INCOMING_CB_ITEM_S;
+
+typedef struct
+{
+ MsgHandle* hAddr;
msg_syncml_msg_incoming_cb pfSyncMLIncomingCB;
void* userParam;
} MSG_SYNCML_INCOMING_CB_ITEM_S;
@@ -89,6 +105,8 @@ typedef struct
typedef std::list<MSG_SENT_STATUS_CB_ITEM_S> MsgSentStatusCBList;
typedef std::list<MSG_INCOMING_CB_ITEM_S> MsgNewMessageCBList;
typedef std::list<MSG_MMS_CONF_INCOMING_CB_ITEM_S> MsgNewMMSConfMessageCBList;
+typedef std::list<MSG_PUSH_INCOMING_CB_ITEM_S> MsgNewPushMessageCBList;
+typedef std::list<MSG_CB_INCOMING_CB_ITEM_S> MsgNewCBMessageCBList;
typedef std::list<MSG_SYNCML_INCOMING_CB_ITEM_S> MsgNewSyncMLMessageCBList;
typedef std::list<MSG_LBS_INCOMING_CB_ITEM_S> MsgNewLBSMessageCBList;
typedef std::list<MSG_SYNCML_OPERATION_CB_ITEM_S> MsgOperationSyncMLMessageCBList;
@@ -109,6 +127,8 @@ public:
bool regSentStatusEventCB(MsgHandle* pMsgHandle, msg_sent_status_cb pfSentStatus, void *pUserParam);
bool regMessageIncomingEventCB(MsgHandle* pMsgHandle, msg_sms_incoming_cb pfNewMessage, int port, void *pUserParam);
bool regMMSConfMessageIncomingEventCB(MsgHandle* pMsgHandle, msg_mms_conf_msg_incoming_cb pfNewMMSConfMessage, const char *pAppId, void *pUserParam);
+ bool regPushMessageIncomingEventCB(MsgHandle* pMsgHandle, msg_push_msg_incoming_cb pfNewPushMessage, const char *pAppId, void *pUserParam);
+ bool regCBMessageIncomingEventCB(MsgHandle* pMsgHandle, msg_cb_incoming_cb pfNewCBMessage, bool bSave, void *pUserParam);
bool regSyncMLMessageIncomingEventCB(MsgHandle* pMsgHandle, msg_syncml_msg_incoming_cb pfNewSyncMLMessage, void *pUserParam);
bool regLBSMessageIncomingEventCB(MsgHandle* pMsgHandle, msg_lbs_msg_incoming_cb pfNewLBSMsgIncoming, void *pUserParam);
bool regSyncMLMessageOperationEventCB(MsgHandle* pMsgHandle, msg_syncml_msg_operation_cb pfSyncMLMessageOperation, void *pUserParam);
@@ -137,6 +157,8 @@ private:
MsgSentStatusCBList sentStatusCBList;
MsgNewMessageCBList newMessageCBList;
MsgNewMMSConfMessageCBList newMMSConfMessageCBList;
+ MsgNewPushMessageCBList newPushMessageCBList;
+ MsgNewCBMessageCBList newCBMessageCBList;
MsgNewSyncMLMessageCBList newSyncMLMessageCBList;
MsgNewLBSMessageCBList newLBSMessageCBList;
MsgOperationSyncMLMessageCBList operationSyncMLMessageCBList;
diff --git a/include/utils/MsgSqliteWrapper.h b/include/utils/MsgSqliteWrapper.h
index e219b7a..55defbc 100755
--- a/include/utils/MsgSqliteWrapper.h
+++ b/include/utils/MsgSqliteWrapper.h
@@ -40,6 +40,7 @@
#define MSGFW_SYNCML_MSG_TABLE_NAME "MSG_SYNCML_TABLE"
#define MSGFW_SMS_SENDOPT_TABLE_NAME "MSG_SMS_SENDOPT_TABLE"
+#define MSGFW_PUSH_CONFIG_TABLE_NAME "MSG_PUSHCFG_TABLE"
#define MAX_QUERY_LEN 3072
#define MAX_FOLDER_NAME_LEN 20
#define MAX_ACCOUNT_NAME_LEN 51