diff options
121 files changed, 1754 insertions, 1889 deletions
diff --git a/framework/plugin-manager/MsgPluginManager.cpp b/framework/plugin-manager/MsgPluginManager.cpp index 70d921c..97e86b4 100755 --- a/framework/plugin-manager/MsgPluginManager.cpp +++ b/framework/plugin-manager/MsgPluginManager.cpp @@ -860,21 +860,21 @@ MsgPlugin::MsgPlugin(MSG_MAIN_TYPE_T mainType, const char *libPath): mSupportedM THROW(MsgException::PLUGIN_ERROR, "ERROR to create plugin handle"); MSG_PLUGIN_LISTENER_S fwListener = {0}; - fwListener.pfSentStatusCb = &MsgSentStatusListener; - fwListener.pfStorageChangeCb = &MsgStorageChangeListener; - fwListener.pfMsgIncomingCb = &MsgIncomingMessageListener; - fwListener.pfInitSimBySatCb = &MsgInitSimBySatListener; - fwListener.pfSyncMLMsgIncomingCb = &MsgIncomingSyncMLMessageListener; - fwListener.pfLBSMsgIncomingCb = &MsgIncomingLBSMessageListener; - fwListener.pfMmsConfIncomingCb = &MsgMmsConfIncomingListener; - fwListener.pfPushMsgIncomingCb = &MsgIncomingPushMessageListener; - fwListener.pfCBMsgIncomingCb = &MsgIncomingCBMessageListener; - fwListener.pfSimMsgIncomingCb = &MsgSimMessageListener; - fwListener.pfResendMessageCb = &MsgResendMessageListener; + fwListener.pfSentStatusCb = &MsgSentStatusListener; + fwListener.pfStorageChangeCb = &MsgStorageChangeListener; + fwListener.pfMsgIncomingCb = &MsgIncomingMessageListener; + fwListener.pfInitSimBySatCb = &MsgInitSimBySatListener; + fwListener.pfSyncMLMsgIncomingCb = &MsgIncomingSyncMLMessageListener; + fwListener.pfLBSMsgIncomingCb = &MsgIncomingLBSMessageListener; + fwListener.pfMmsConfIncomingCb = &MsgMmsConfIncomingListener; + fwListener.pfPushMsgIncomingCb = &MsgIncomingPushMessageListener; + fwListener.pfCBMsgIncomingCb = &MsgIncomingCBMessageListener; + fwListener.pfSimMsgIncomingCb = &MsgSimMessageListener; + fwListener.pfResendMessageCb = &MsgResendMessageListener; #ifdef FEATURE_SMS_CDMA fwListener.pfCheckUniquenessCb = &MsgCheckUniquenessListener; #endif - fwListener.pfSimInitImsiCb = &MsgSimImsiListener; + fwListener.pfSimInitImsiCb = &MsgSimImsiListener; if (registerListener(&fwListener) != MSG_SUCCESS) THROW(MsgException::PLUGIN_ERROR, "ERROR to register listener"); diff --git a/framework/transaction-manager/MsgTransManager.cpp b/framework/transaction-manager/MsgTransManager.cpp index dcede79..d59bcd6 100755 --- a/framework/transaction-manager/MsgTransManager.cpp +++ b/framework/transaction-manager/MsgTransManager.cpp @@ -78,27 +78,27 @@ MsgTransactionManager::MsgTransactionManager() : running(false), mx(), mxQ(), cv /* Fill in mMsgHandlers, as given in the below. */ handlerMap[MSG_CMD_ADD_MSG] = &MsgAddMessageHandler; handlerMap[MSG_CMD_ADD_SYNCML_MSG] = &MsgAddSyncMLMessageHandler; - handlerMap[MSG_CMD_UPDATE_MSG] = &MsgUpdateMessageHandler; - handlerMap[MSG_CMD_UPDATE_READ] = &MsgUpdateReadStatusHandler; - handlerMap[MSG_CMD_UPDATE_PROTECTED] = &MsgUpdateProtectedStatusHandler; + handlerMap[MSG_CMD_UPDATE_MSG] = &MsgUpdateMessageHandler; + handlerMap[MSG_CMD_UPDATE_READ] = &MsgUpdateReadStatusHandler; + handlerMap[MSG_CMD_UPDATE_PROTECTED] = &MsgUpdateProtectedStatusHandler; handlerMap[MSG_CMD_DELETE_MSG] = &MsgDeleteMessageHandler; - handlerMap[MSG_CMD_DELALL_MSGINFOLDER] = &MsgDeleteAllMessageInFolderHandler; + handlerMap[MSG_CMD_DELALL_MSGINFOLDER] = &MsgDeleteAllMessageInFolderHandler; handlerMap[MSG_CMD_MOVE_MSGTOFOLDER] = &MsgMoveMessageToFolderHandler; handlerMap[MSG_CMD_MOVE_MSGTOSTORAGE] = &MsgMoveMessageToStorageHandler; - handlerMap[MSG_CMD_COUNT_MSG] = &MsgCountMessageHandler; - handlerMap[MSG_CMD_GET_MSG] = &MsgGetMessageHandler; + handlerMap[MSG_CMD_COUNT_MSG] = &MsgCountMessageHandler; + handlerMap[MSG_CMD_GET_MSG] = &MsgGetMessageHandler; - handlerMap[MSG_CMD_ADD_FOLDER] = &MsgAddFolderHandler; + handlerMap[MSG_CMD_ADD_FOLDER] = &MsgAddFolderHandler; handlerMap[MSG_CMD_UPDATE_FOLDER] = &MsgUpdateFolderHandler; - handlerMap[MSG_CMD_DELETE_FOLDER] = &MsgDeleteFolderHandler; - handlerMap[MSG_CMD_GET_FOLDERLIST] = &MsgGetFolderListHandler; - - handlerMap[MSG_CMD_ADD_FILTER] = &MsgAddFilterHandler; - handlerMap[MSG_CMD_UPDATE_FILTER] = &MsgUpdateFilterHandler; - handlerMap[MSG_CMD_DELETE_FILTER] = &MsgDeleteFilterHandler; - handlerMap[MSG_CMD_GET_FILTERLIST] = &MsgGetFilterListHandler; - handlerMap[MSG_CMD_SET_FILTER_OPERATION] = &MsgSetFilterOperationHandler; - handlerMap[MSG_CMD_GET_FILTER_OPERATION] = &MsgGetFilterOperationHandler; + handlerMap[MSG_CMD_DELETE_FOLDER] = &MsgDeleteFolderHandler; + handlerMap[MSG_CMD_GET_FOLDERLIST] = &MsgGetFolderListHandler; + + handlerMap[MSG_CMD_ADD_FILTER] = &MsgAddFilterHandler; + handlerMap[MSG_CMD_UPDATE_FILTER] = &MsgUpdateFilterHandler; + handlerMap[MSG_CMD_DELETE_FILTER] = &MsgDeleteFilterHandler; + handlerMap[MSG_CMD_GET_FILTERLIST] = &MsgGetFilterListHandler; + handlerMap[MSG_CMD_SET_FILTER_OPERATION] = &MsgSetFilterOperationHandler; + handlerMap[MSG_CMD_GET_FILTER_OPERATION] = &MsgGetFilterOperationHandler; handlerMap[MSG_CMD_SET_FILTER_ACTIVATION] = &MsgSetFilterActivationHandler; handlerMap[MSG_CMD_SUBMIT_REQ] = &MsgSubmitReqHandler; @@ -125,17 +125,17 @@ MsgTransactionManager::MsgTransactionManager() : running(false), mx(), mxQ(), cv handlerMap[MSG_CMD_PLG_INCOMING_LBS_IND] = &MsgIncomingLBSMsgHandler; handlerMap[MSG_CMD_PLG_INIT_SIM_BY_SAT] = &MsgInitSimBySatHandler; - handlerMap[MSG_CMD_GET_THREADVIEWLIST] = &MsgGetThreadViewListHandler; - handlerMap[MSG_CMD_DELETE_THREADMESSAGELIST] = &MsgDeleteThreadMessageListHandler; + handlerMap[MSG_CMD_GET_THREADVIEWLIST] = &MsgGetThreadViewListHandler; + handlerMap[MSG_CMD_DELETE_THREADMESSAGELIST] = &MsgDeleteThreadMessageListHandler; handlerMap[MSG_CMD_SET_TEMP_ADDRESS_TABLE] = &MsgSetTempAddressTableHandler; handlerMap[MSG_CMD_GET_CONTACT_COUNT] = &MsgCountMsgByContactHandler; - handlerMap[MSG_CMD_GET_QUICKPANEL_DATA] = &MsgGetQuickPanelDataHandler; - handlerMap[MSG_CMD_COUNT_BY_MSGTYPE] = &MsgCountMsgByTypeHandler; - handlerMap[MSG_CMD_RESET_DB] = &MsgResetDatabaseHandler; - handlerMap[MSG_CMD_GET_MEMSIZE] = &MsgGetMemSizeHandler; + handlerMap[MSG_CMD_GET_QUICKPANEL_DATA] = &MsgGetQuickPanelDataHandler; + handlerMap[MSG_CMD_COUNT_BY_MSGTYPE] = &MsgCountMsgByTypeHandler; + handlerMap[MSG_CMD_RESET_DB] = &MsgResetDatabaseHandler; + handlerMap[MSG_CMD_GET_MEMSIZE] = &MsgGetMemSizeHandler; - handlerMap[MSG_CMD_BACKUP_MESSAGE] = &MsgBackupMessageHandler; + handlerMap[MSG_CMD_BACKUP_MESSAGE] = &MsgBackupMessageHandler; handlerMap[MSG_CMD_RESTORE_MESSAGE] = &MsgRestoreMessageHandler; handlerMap[MSG_CMD_UPDATE_THREAD_READ] = &MsgUpdateThreadReadStatusHandler; diff --git a/include/common/MsgCmdTypes.h b/include/common/MsgCmdTypes.h index 4b8f469..fed00ec 100755 --- a/include/common/MsgCmdTypes.h +++ b/include/common/MsgCmdTypes.h @@ -18,19 +18,19 @@ #define MSG_CMD_TYPES_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgTypes.h" /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define MAX_COOKIE_LEN 20 /*================================================================================================== - TYPES + TYPES ==================================================================================================*/ typedef unsigned int MSG_CMD_TYPE_T; @@ -38,18 +38,16 @@ typedef unsigned int MSG_EVENT_TYPE_T; /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ -typedef struct _MSG_CMD_S -{ +typedef struct _MSG_CMD_S { MSG_CMD_TYPE_T cmdType; char cmdCookie[MAX_COOKIE_LEN]; char cmdData[2]; } MSG_CMD_S; -typedef struct _MSG_EVENT_S -{ +typedef struct _MSG_EVENT_S { MSG_EVENT_TYPE_T eventType; msg_error_t result; char data[2]; @@ -57,11 +55,10 @@ typedef struct _MSG_EVENT_S /*================================================================================================== - ENUMS + ENUMS ==================================================================================================*/ -enum _MSG_CMD_TYPE_E -{ +enum _MSG_CMD_TYPE_E { MSG_CMD_OPEN_HANDLE = 0, MSG_CMD_CLOSE_HANDLE, MSG_CMD_GET_STORAGELIST, @@ -173,8 +170,7 @@ enum _MSG_CMD_TYPE_E MSG_CMD_NUM }; -enum _MSG_EVENT_TYPE_E -{ +enum _MSG_EVENT_TYPE_E { MSG_EVENT_OPEN_HANDLE = 0, MSG_EVENT_CLOSE_HANDLE, MSG_EVENT_GET_STORAGELIST, diff --git a/include/common/MsgCppTypes.h b/include/common/MsgCppTypes.h index 01546d9..da37b5f 100755 --- a/include/common/MsgCppTypes.h +++ b/include/common/MsgCppTypes.h @@ -18,15 +18,16 @@ #define __MSG_CPP_TYPES_H__ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <stdio.h> #include <memory> template <typename T> -void unique_ptr_deleter(T **ptr) { - if (ptr && *ptr ) - delete[] *ptr; +void unique_ptr_deleter(T **ptr) +{ + if (ptr && *ptr) + delete[] *ptr; } template <class T> @@ -44,9 +45,8 @@ public: ~AutoPtr() { - if (ptr) - { - if ( *ptr ) delete[] *ptr; + if (ptr) { + if (*ptr) delete[] *ptr; } } }; diff --git a/include/common/MsgFilterTypes.h b/include/common/MsgFilterTypes.h index eb05322..41ce914 100755 --- a/include/common/MsgFilterTypes.h +++ b/include/common/MsgFilterTypes.h @@ -18,9 +18,9 @@ #define MSG_FILTER_TYPES_H /** - * @file MsgFilterTypes.h - * @brief Defines filter types of messaging framework - * @version 1.0 + * @file MsgFilterTypes.h + * @brief Defines filter types of messaging framework + * @version 1.0 */ /** @@ -31,7 +31,7 @@ */ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgTypes.h" @@ -43,15 +43,14 @@ */ /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ /** * @brief Represents filter informatioin. \n * It represents the basic filter unit. */ -typedef struct -{ +typedef struct { msg_filter_id_t filterId; /**< Indicates the filter ID. */ msg_filter_type_t filterType; /**< Indicates the filter type. */ char filterValue[MAX_FILTER_VALUE_LEN+1]; /**< The value of a filter. */ diff --git a/include/common/MsgInternalTypes.h b/include/common/MsgInternalTypes.h index ebc78a0..562fc8f 100755 --- a/include/common/MsgInternalTypes.h +++ b/include/common/MsgInternalTypes.h @@ -18,19 +18,19 @@ #define MSG_INTERNAL_TYPES_H /** - * @file MsgInternalTypes.h - * @brief Defines types of messaging framework - * @version 1.0 + * @file MsgInternalTypes.h + * @brief Defines types of messaging framework + * @version 1.0 */ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMmsTypes.h" /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define MSG_DATA_ROOT_PATH TZ_SYS_DATA_PATH"/msg-service/" #define MSG_DATA_PATH MSG_DATA_ROOT_PATH"msgdata/" @@ -53,7 +53,7 @@ #define MAX_SIM_MSISDN_LEN 26 #define MAX_COMMON_INFO_SIZE 20 #define MAX_VCONFKEY_NAME_LEN 128 -#define MAX_SIM_IMSI_LEN 16 +#define MAX_SIM_IMSI_LEN 16 #define MAX_TAPI_SIM_API_TIMEOUT 70 #define MSG_EVENT_MSG_ID_LEN (32) @@ -192,7 +192,7 @@ #define MSG_TELEPHONY_MMS_FEATURE "http://tizen.org/feature/network.telephony.mms" /*================================================================================================== - TYPES + TYPES ==================================================================================================*/ /** @@ -219,14 +219,13 @@ typedef unsigned char MSG_CLASS_TYPE_T; /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ /** * @brief Represents a message type. */ -typedef struct -{ +typedef struct { MSG_MAIN_TYPE_T mainType; /**< Message main type. See enum _MSG_MAIN_TYPE_E */ MSG_SUB_TYPE_T subType; /**< Message sub type. See enum _MSG_SUB_TYPE_E */ MSG_CLASS_TYPE_T classType; /**< Message class type. See enum _MSG_CLASS_TYPE_E */ @@ -236,8 +235,7 @@ typedef struct /** * @brief Represents a message in the framework. */ -typedef struct -{ +typedef struct { msg_message_id_t msgId; /**< Indicates the message ID of this message. */ msg_thread_id_t threadId; /**< Indicates the thread ID. */ msg_folder_id_t folderId; /**< Indicates the folder ID. */ @@ -270,8 +268,7 @@ typedef struct } MSG_MESSAGE_INFO_S; -typedef struct -{ +typedef struct { msg_message_id_t msgId; /**< Indicates the message ID of this message. */ msg_thread_id_t threadId; /**< Indicates the thread ID. */ msg_folder_id_t folderId; /**< Indicates the folder ID. see enum _MSG_FOLDER_TYPE_E */ @@ -279,7 +276,7 @@ typedef struct MSG_SUB_TYPE_T subType; /**< Message sub type. See enum _MSG_SUB_TYPE_E */ MSG_CLASS_TYPE_T classType; /**< Message class type. See enum _MSG_CLASS_TYPE_E */ msg_storage_id_t storageId; /**< Indicates where the message is saved. see enum _MSG_FOLDER_TYPE_E*/ - msg_struct_list_s *addr_list; + msg_struct_list_s *addr_list; GList *addressList; char replyAddress[MAX_PHONE_NUMBER_LEN+1]; /**< Indicates the reply address. */ char subject[MAX_SUBJECT_LEN+1]; /**< Indicates the message subject. */ @@ -307,8 +304,7 @@ typedef struct /** * @brief Represents message information for thread view. */ -typedef struct -{ +typedef struct { msg_thread_id_t threadId; /**< Indicates the thread ID of this peer. */ char threadName[MAX_THREAD_NAME_LEN+1]; /**< Indicates the name of this peer. > */ MSG_MAIN_TYPE_T mainType; /**< Indicates the latest msg main type. */ @@ -329,8 +325,7 @@ typedef struct /** * @brief Represents message information for conversation view. */ -typedef struct -{ +typedef struct { msg_message_id_t msgId; /**< Indicates the message ID of this message. */ msg_thread_id_t threadId; /**< Indicates the thread ID of this peer. */ MSG_MAIN_TYPE_T mainType; /**< Message main type. See enum _MSG_MAIN_TYPE_E */ @@ -358,8 +353,7 @@ typedef struct int simIndex; } MSG_CONVERSATION_VIEW_S; -typedef struct -{ +typedef struct { MimeType type; /**< Indicates the multipart mime type. see enum MimeType */ char szContentType[MSG_MSG_ID_LEN + 1]; /**< Indicates the content type */ char szFileName[MSG_FILENAME_LEN_MAX + 1]; /**< Indicates the file name */ @@ -367,7 +361,7 @@ typedef struct char szContentID[MSG_MSG_ID_LEN + 1]; /**< Indicates the content id */ char szContentLocation[MSG_MSG_ID_LEN + 1]; /**< Indicates the content Location */ - int tcs_bc_level; /** detect malware type **/ + int tcs_bc_level; /** detect malware type **/ char szThumbFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the thumbnail file path */ } MSG_MMS_MULTIPART_S; @@ -377,8 +371,7 @@ typedef struct * Applications compose a request and send it to the framework via Message handle. \n * This request ID is used to manage the request by the framework. */ -typedef struct -{ +typedef struct { msg_request_id_t reqId; /**< Indicates the request ID, which is unique. When applications submit a request to the framework, this value will be set by the framework. */ MSG_MESSAGE_INFO_S msgInfo; /**< Indicates the message structure to be sent by applications. */ @@ -390,8 +383,7 @@ typedef struct * @brief Represents proxy information. \n * This stucture contains the information about the status cnf of a sent message. */ -typedef struct -{ +typedef struct { int listenerFd; /**< Rx fd for status cnf */ unsigned long handleAddr; /**< Handle address for status cnf */ msg_message_id_t sentMsgId; /**< The ID of a sent message for updating message status */ @@ -402,18 +394,16 @@ typedef struct * @brief Aux data structure for MSG_CMD_REG_INCOMING_MSG_CB. \n * This stucture contains the information about the receiver for msgType and port. */ -typedef struct -{ - int listenerFd; - MSG_MAIN_TYPE_T msgType; - unsigned short port; +typedef struct { + int listenerFd; + MSG_MAIN_TYPE_T msgType; + unsigned short port; } MSG_CMD_REG_INCOMING_MSG_CB_S; -typedef struct -{ - int listenerFd; - MSG_MAIN_TYPE_T msgType; - bool bsave; +typedef struct { + int listenerFd; + MSG_MAIN_TYPE_T msgType; + bool bsave; } MSG_CMD_REG_CB_INCOMING_MSG_CB_S; @@ -421,10 +411,9 @@ typedef struct * @brief Aux data structure for MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB. \n * This stucture contains the information about the receiver for msgType and port. */ -typedef struct -{ - int listenerFd; - MSG_MAIN_TYPE_T msgType; +typedef struct { + int listenerFd; + MSG_MAIN_TYPE_T msgType; char appId[MAX_MMS_JAVA_APPID_LEN+1]; } MSG_CMD_REG_INCOMING_MMS_CONF_MSG_CB_S; @@ -433,10 +422,9 @@ typedef struct * @brief Aux data structure for MSG_CMD_REG_INCOMING_SYNCML_MSG_CB. \n * This stucture contains the information about the receiver for msgType and port. */ -typedef struct -{ - int listenerFd; - MSG_MAIN_TYPE_T msgType; +typedef struct { + int listenerFd; + MSG_MAIN_TYPE_T msgType; } MSG_CMD_REG_INCOMING_SYNCML_MSG_CB_S; @@ -444,10 +432,9 @@ typedef struct * @brief Aux data structure for MSG_CMD_REG_INCOMING_LBS_MSG_CB_S. \n * This stucture contains the information about the receiver for msgType and port. */ -typedef struct -{ - int listenerFd; - MSG_MAIN_TYPE_T msgType; +typedef struct { + int listenerFd; + MSG_MAIN_TYPE_T msgType; } MSG_CMD_REG_INCOMING_LBS_MSG_CB_S; @@ -455,10 +442,9 @@ typedef struct * @brief Aux data structure for MSG_CMD_REG_INCOMING_JAVAMMS_TRID_S. \n * This stucture contains the information about the sent Java MMS messge transactionId. */ -typedef struct -{ - bool posted; - char id[MMS_TR_ID_LEN+1]; +typedef struct { + bool posted; + char id[MMS_TR_ID_LEN+1]; char pduFileName[MAX_COMMON_INFO_SIZE+1]; } MSG_CMD_REG_INCOMING_JAVAMMS_TRID_S; @@ -467,24 +453,21 @@ typedef struct * @brief Aux data structure for MSG_CMD_REG_SYNCML_MSG_OPERATION_CB. \n * This stucture contains the information about the receiver for msgType and port. */ -typedef struct -{ - int listenerFd; - MSG_MAIN_TYPE_T msgType; +typedef struct { + int listenerFd; + MSG_MAIN_TYPE_T msgType; } MSG_CMD_REG_SYNCML_MSG_OPERATION_CB_S; -typedef struct -{ - int listenerFd; - MSG_MAIN_TYPE_T msgType; +typedef struct { + int listenerFd; + MSG_MAIN_TYPE_T msgType; char appId[MAX_WAPPUSH_ID_LEN+1]; char content_type[MAX_WAPPUSH_CONTENT_TYPE_LEN+1]; } MSG_CMD_REG_INCOMING_PUSH_MSG_CB_S; -typedef struct -{ - int listenerFd; - MSG_MAIN_TYPE_T msgType; +typedef struct { + int listenerFd; + MSG_MAIN_TYPE_T msgType; bool bsave; } MSG_CMD_REG_INCOMING_CB_MSG_CB_S; @@ -492,8 +475,7 @@ typedef struct /** * @brief Represents a CB message in the framework. */ -typedef struct -{ +typedef struct { MSG_SUB_TYPE_T type; time_t receivedTime; @@ -509,8 +491,7 @@ typedef struct } MSG_CB_MSG_S; #ifdef FEATURE_SMS_CDMA -typedef struct _MSG_UNIQUE_INDEX_S -{ +typedef struct _MSG_UNIQUE_INDEX_S { unsigned short tele_msgId; char address[MAX_ADDRESS_VAL_LEN+1]; char sub_address[MAX_ADDRESS_VAL_LEN+1]; @@ -518,8 +499,7 @@ typedef struct _MSG_UNIQUE_INDEX_S int telesvc_id; } MSG_UNIQUE_INDEX_S; -typedef struct -{ +typedef struct { time_t receivedTime; unsigned short serialNum; unsigned short messageId; /**< Message Identifier */ @@ -528,7 +508,7 @@ typedef struct /*================================================================================================== - ENUMS + ENUMS ==================================================================================================*/ /** @@ -536,8 +516,7 @@ typedef struct * Three main types of a message are predefined : SMS, MMS, and Email. More main types of a message can be defined here. \n * This enum is used as the value of MSG_MAIN_TYPE_T. */ -enum _MSG_MAIN_TYPE_E -{ +enum _MSG_MAIN_TYPE_E { MSG_UNKNOWN_TYPE = 0, /**< Unknown main type */ MSG_SMS_TYPE, /**< SMS */ MSG_MMS_TYPE, /**< MMS */ @@ -549,13 +528,12 @@ enum _MSG_MAIN_TYPE_E * Three sub types of a message are predefined : NORMAL, WAPPUSH, and CB. More sub types of a message can be defined here. \n * This enum is used as the value of MSG_SUB_TYPE_T. */ -enum _MSG_SUB_TYPE_E -{ +enum _MSG_SUB_TYPE_E { /* SMS Specific Message Type */ MSG_NORMAL_SMS = 0, /**< Text SMS message */ MSG_CB_SMS, /**< Cell Broadcasting message */ MSG_JAVACB_SMS, /**< JAVA Cell Broadcasting message */ - MSG_TYPE0_SMS, /**< Short Message Type 0 */ + MSG_TYPE0_SMS, /**< Short Message Type 0 */ MSG_REPLACE_TYPE1_SMS, /**< Replace Short Message Type 1 */ MSG_REPLACE_TYPE2_SMS, /**< Replace Short Message Type 2 */ MSG_REPLACE_TYPE3_SMS, /**< Replace Short Message Type 3 */ @@ -578,7 +556,7 @@ enum _MSG_SUB_TYPE_E /* MMS Specific Message Type */ MSG_SENDREQ_MMS = 24, /**< MMS Send Request message */ - MSG_SENDCONF_MMS, /**< MMS Send Confirm message */ + MSG_SENDCONF_MMS, /**< MMS Send Confirm message */ MSG_NOTIFICATIONIND_MMS, /**< MMS Notification Indication message */ MSG_GET_MMS, /**< MMS GET MMS message */ MSG_NOTIFYRESPIND_MMS, /**< MMS Notify Response Indication message */ @@ -591,9 +569,9 @@ enum _MSG_SUB_TYPE_E MSG_READORGIND_MMS, /**< MMS Read Origin Indication message */ MSG_FORWARD_MMS, /**< MMS Forward message */ MSG_FORWARDREQ_MMS, /**< MMS Forward Request message */ - MSG_FORWARDCONF_MMS, /**< MMS Forward Confirm message */ + 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_SENDREQ_JAVA_MMS, /**< MMS Send Request message for JAVA MMS */ MSG_ETWS_SMS, MSG_MWI_VOICE2_SMS, /**< MWI Message Voice for line 2(CPHS)*/ @@ -612,8 +590,7 @@ enum _MSG_SUB_TYPE_E * @brief Represents the values of File Type of MMS. \n * This enum is used as the value of . */ -enum _MSG_MMS_ITEM_TYPE_E -{ +enum _MSG_MMS_ITEM_TYPE_E { MSG_MMS_ITEM_TYPE_IMG, /**< Indicates the image media */ MSG_MMS_ITEM_TYPE_AUDIO, /**< Indicates the audio media */ MSG_MMS_ITEM_TYPE_VIDEO, /**< Indicates the video media */ diff --git a/include/common/MsgMmsTypes.h b/include/common/MsgMmsTypes.h index 7e48cc3..2c1825e 100755 --- a/include/common/MsgMmsTypes.h +++ b/include/common/MsgMmsTypes.h @@ -18,9 +18,9 @@ #define MSG_MMS_TYPES_H /** - * @file MsgMmsTypes.h - * @brief Defines MMS types of messaging framework - * @version 1.0 + * @file MsgMmsTypes.h + * @brief Defines MMS types of messaging framework + * @version 1.0 */ /** @@ -31,7 +31,7 @@ */ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgTypes.h" @@ -48,13 +48,12 @@ typedef GList MMSList; /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ - /** * @brief Represents text information. */ -typedef struct { +typedef struct { char szTransInId[MAX_SMIL_TRANSIN_ID + 1]; /**< Indicates the In SMIL transition id */ char szTransOutId[MAX_SMIL_TRANSOUT_ID + 1]; /**< Indicates the Out SMIL transition id */ int nRepeat; /**< Indicates the text needs to be displayed repeatedly */ @@ -69,7 +68,7 @@ typedef struct { MmsTextDirection nDirection; /**< Indicates the text direction type. see enum MmsTextDirection */ int nSize; /**< Indicates the font size */ int nColor; /**< Indicates the font color */ -}MmsSmilText; +} MmsSmilText; /** * @brief Represents video information. @@ -82,13 +81,12 @@ typedef struct { int nEnd; /**< Indicates the end time */ int nDurTime; /**< Indicates the duration */ int nBgColor; /**< Indicates the background color of the text */ -}MmsSmilAVI; +} MmsSmilAVI; /** * @brief Represents media information. */ -typedef struct -{ +typedef struct { MmsSmilMediaType mediatype; /**< Indicates the SMIL media type. see enum MmsSmilMediaType */ char szSrc[MSG_FILEPATH_LEN_MAX + 1];/**< Indicates the media source name */ @@ -111,8 +109,7 @@ typedef struct /** * @brief Represents attachment information. */ -typedef struct -{ +typedef struct { MimeType mediatype; /**< Indicates the file mime type. see enum MimeType */ char szFileName[MSG_FILENAME_LEN_MAX + 1]; /**< Indicates the file name */ char szFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the file path */ @@ -125,32 +122,29 @@ typedef struct /** * @brief Represents SMIL page information. */ -typedef struct -{ +typedef struct { int mediaCnt; /**< The count of the media */ - GList *medialist; /**< The pointer to media list */ + GList *medialist; /**< The pointer to media list */ int nDur; /**< Indicates the duration of the page */ int nBegin; /**< Indicates the begin time of the page */ int nEnd; /**< Indicates the end time of the page */ int nMin; /**< Indicates the min attribute of the page */ int nMax; /**< Indicates the max attribute of the page */ int nRepeat; /**< Indicates the page needs to be displayed repeatedly */ -}MMS_PAGE_S; +} MMS_PAGE_S; /** * @brief Represents length information. */ -typedef struct -{ - bool bUnitPercent; /**< Indicates the length is in percentage(%) or not */ +typedef struct { + bool bUnitPercent; /**< Indicates the length is in percentage(%) or not */ int value; /**< Indicates the value for length */ } MMS_LENGTH; /** * @brief Represents SMIL region information. */ -typedef struct -{ +typedef struct { char szID[MAX_SMIL_REGION_ID + 1]; /**< Indicates the ID of region information */ MMS_LENGTH nLeft; /**< Indicates the left co-ordinate of the region */ MMS_LENGTH nTop; /**< Indicates the top co-ordinate of the region */ @@ -164,59 +158,54 @@ typedef struct /** * @brief Represents SMIL root layout information. */ -typedef struct -{ +typedef struct { MMS_LENGTH width; /**< Indicates the width of the root layout */ MMS_LENGTH height; /**< Indicates the height of the root layout, '%' rate should be supported */ bool bBgColor; /**< Indicates the background color set in the root layout */ int bgColor; /**< Indicates the background color of the root layout */ -}MMS_SMIL_ROOTLAYOUT; +} MMS_SMIL_ROOTLAYOUT; /** * @brief Represents SMIL transition information. */ -typedef struct -{ +typedef struct { char szID[MAX_SMIL_TRANSITION_ID + 1]; /**< Indicates the ID of transition information */ MmsSmilTransType nType; /**< Indicates the transition type. see enum MmsSmilTransType */ MmsSmilTransSubType nSubType; /**< Indicates the transition sub type. see enum MmsSmilTransSubType */ int nDur; /**< Indicates the transition duration */ -}MMS_SMIL_TRANSITION; +} MMS_SMIL_TRANSITION; /** * @brief Represents SMIL meta information. */ -typedef struct -{ +typedef struct { char szID[MAX_SMIL_META_ID + 1]; /**< Indicates the ID of meta information */ char szName[MAX_SMIL_META_NAME + 1]; /**< Indicates the Name */ char szContent[MAX_SMIL_META_CONTENT + 1]; /**< Indicates the content */ -}MMS_SMIL_META; +} MMS_SMIL_META; /** * @brief Represents application id information for JAVA MMS msg. */ -typedef struct -{ - bool valid; /**< Indicates whether application id information is used or not. */ - char appId[MAX_MMS_JAVA_APPID_LEN + 1]; /**< application id, it should not exceed 32 chars */ - char replyToAppId[MAX_MMS_JAVA_APPID_LEN + 1]; /**< reply to application id, application id, it should not exceeded 32 chars */ -}MMS_APPID_INFO_S; +typedef struct { + bool valid; /**< Indicates whether application id information is used or not. */ + char appId[MAX_MMS_JAVA_APPID_LEN + 1]; /**< application id, it should not exceed 32 chars */ + char replyToAppId[MAX_MMS_JAVA_APPID_LEN + 1]; /**< reply to application id, application id, it should not exceeded 32 chars */ +} MMS_APPID_INFO_S; #define MAX_FULL_PATH_SIZE_S 160 /* max length for internal file path */ -typedef struct -{ +typedef struct { char szMsgID[MMS_MSG_ID_LEN + 1]; char retrievedFilePath[MAX_FULL_PATH_SIZE_S + 1]; char szTrID[MMS_TR_ID_LEN + 1]; MMS_APPID_INFO_S msgAppId; -}MMS_RECV_DATA_S; +} MMS_RECV_DATA_S; typedef struct _MMS_ADDRESS_DATA_S { int address_type; @@ -226,8 +215,7 @@ typedef struct _MMS_ADDRESS_DATA_S { /** * @brief Represents MMS header data. */ -typedef struct _MMS_HEADER_DATA_S -{ +typedef struct _MMS_HEADER_DATA_S { MMSList *bcc; /* Bcc */ MMSList *cc; /* Cc */ char contentLocation[MMS_LOCATION_LEN + 1]; @@ -241,10 +229,10 @@ typedef struct _MMS_HEADER_DATA_S char messageID[MSG_MSG_ID_LEN + 1]; int messageType; /* MmsMsgType : ex) sendreq */ int mmsVersion; /* 1.0 1.3 */ - int messageSize; /* X-Mms-Message-Size */ + int messageSize; /* X-Mms-Message-Size */ int mmsPriority; /* _MSG_PRIORITY_TYPE_E : Low | Normal | High */ bool bReadReport; /* X-Mms-Read-Report */ - bool bHideAddress; /* X-Mms-Sender-Visibility */ + bool bHideAddress; /* X-Mms-Sender-Visibility */ msg_delivery_report_status_t mmsStatus; /* X-Mms-Status */ char szSubject[MAX_SUBJECT_LEN + 1]; /* Subject */ MMSList *to; /* to */ @@ -298,8 +286,7 @@ typedef struct _MMS_HEADER_DATA_S /** * @brief Represents MMS multipart data. */ -typedef struct -{ +typedef struct { MimeType type; /**< Indicates the multipart mime type. see enum MimeType */ char szContentType[MSG_MSG_ID_LEN + 1]; /**< Indicates the content type */ char szFileName[MSG_FILENAME_LEN_MAX + 1]; /**< Indicates the file name */ @@ -311,29 +298,28 @@ typedef struct char *pMultipartData; size_t nMultipartDataLen; int tcs_bc_level; /** detect malware type **/ - int malware_allow; + int malware_allow; char szThumbFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the thubnail file path */ } MMS_MULTIPART_DATA_S; /** * @brief Represents MMS message data. */ -typedef struct _MMS_MESSAGE_DATA_S -{ - int backup_type; /**< normal = 0|| backup = 1; */ +typedef struct _MMS_MESSAGE_DATA_S { + int backup_type; /**< normal = 0|| backup = 1; */ char szSmilFilePath[MSG_FILEPATH_LEN_MAX + 1]; /**< Indicates the SMIL file path */ int pageCnt; /**< The count of the SMIL pages */ GList *pagelist; /**< The pointer to SMIL pages list */ int regionCnt; /**< The count of the SMIL regions */ - GList *regionlist; /**< The pointer to SMIL regions list */ + GList *regionlist; /**< The pointer to SMIL regions list */ int attachCnt; /**< The count of the attachments */ - GList *attachlist; /**< The pointer to attachment list */ + GList *attachlist; /**< The pointer to attachment list */ int transitionCnt; /**< The count of the SMIL transitions information */ - GList *transitionlist; /**< The pointer to SMIL transitions list */ + GList *transitionlist; /**< The pointer to SMIL transitions list */ int metaCnt; /**< The count of the SMIL meta information */ - GList *metalist; /**< The pointer to SMIL meta list */ + GList *metalist; /**< The pointer to SMIL meta list */ MMS_SMIL_ROOTLAYOUT rootlayout; /**< Indicates the root layout information */ - MMS_APPID_INFO_S msgAppId; + MMS_APPID_INFO_S msgAppId; MMS_HEADER_DATA_S header; /**< use for scloud */ MMS_MULTIPART_DATA_S smil;/**< use for scloud */ } MMS_MESSAGE_DATA_S; @@ -341,8 +327,7 @@ typedef struct _MMS_MESSAGE_DATA_S /** * @brief Represents MMS message data. */ -typedef struct -{ +typedef struct { int backup_type; /* none = 0 || scloud backup = 1 || kies backup = 2; */ MMS_HEADER_DATA_S *header; /**< The header struct of MMS*/ MMS_MULTIPART_DATA_S *smil; diff --git a/include/common/MsgPluginInterface.h b/include/common/MsgPluginInterface.h index cd8daa5..62ab9fb 100755 --- a/include/common/MsgPluginInterface.h +++ b/include/common/MsgPluginInterface.h @@ -15,9 +15,9 @@ */ /** - * @file MsgPluginInterface.h - * @brief Defines plug-ins API of messaging framework - * @version 1.0 + * @file MsgPluginInterface.h + * @brief Defines plug-ins API of messaging framework + * @version 1.0 */ #ifndef MSG_PLUGIN_INTERFACE_H @@ -31,7 +31,7 @@ */ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgTransportTypes.h" #include "MsgStorageTypes.h" @@ -51,7 +51,7 @@ extern "C" */ /*================================================================================================== - TYPE DEFINES + TYPE DEFINES ==================================================================================================*/ typedef struct _MSG_PLUGIN_HANDLER_S MSG_PLUGIN_HANDLER_S; @@ -59,7 +59,7 @@ typedef struct _MSG_PLUGIN_LISTENER_S MSG_PLUGIN_LISTENER_S; /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ /** @@ -1067,10 +1067,9 @@ typedef bool (*MsgPlgCheckUniqueness)(MSG_UNIQUE_INDEX_S *p_msg, msg_message_id_ typedef msg_error_t (*MsgPlgOnInitImsi)(int sim_idx); /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ -struct _MSG_PLUGIN_LISTENER_S -{ +struct _MSG_PLUGIN_LISTENER_S { MsgPlgOnSentStatus pfSentStatusCb; /** The function pointer of sent status callback. */ MsgPlgOnStorageChange pfStorageChangeCb; /** The function pointer of storage change callback. */ MsgPlgOnMsgIncoming pfMsgIncomingCb; /** The function pointer of receive message callback. */ @@ -1079,7 +1078,7 @@ struct _MSG_PLUGIN_LISTENER_S 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 */ + MsgPlgOnMmsConfIncoming pfMmsConfIncomingCb; /** The function pointer of receive MMS conf */ MsgPlgOnSimMessageIncoming pfSimMsgIncomingCb; /** The function pointer of sim message callback */ MsgPlgOnResendMessage pfResendMessageCb; #ifdef FEATURE_SMS_CDMA @@ -1089,13 +1088,12 @@ struct _MSG_PLUGIN_LISTENER_S }; -struct _MSG_PLUGIN_HANDLER_S -{ - MsgPlgInitialize pfInitialize; /**< The function pointer of initialize. */ - MsgPlgFinalize pfFinalize; /**< The function pointer of finalize. */ - MsgPlgRegisterListener pfRegisterListener; /**< The function pointer of register listener. */ - MsgPlgSubmitRequest pfSubmitRequest; /**< The function pointer of submit request. */ - MsgPlgSaveSimMessage pfSaveSimMessage; /**< The function pointer of save SIM msg. */ +struct _MSG_PLUGIN_HANDLER_S { + MsgPlgInitialize pfInitialize; /**< The function pointer of initialize. */ + MsgPlgFinalize pfFinalize; /**< The function pointer of finalize. */ + MsgPlgRegisterListener pfRegisterListener; /**< The function pointer of register listener. */ + MsgPlgSubmitRequest pfSubmitRequest; /**< The function pointer of submit request. */ + MsgPlgSaveSimMessage pfSaveSimMessage; /**< The function pointer of save SIM msg. */ MsgPlgDeleteSimMessage pfDeleteSimMessage; /**< The function pointer of delete SIM msg. */ MsgPlgSetReadStatus pfSetReadStatus; /**< The function pointer of set read status. */ MsgPlgSetMemoryStatus pfSetMemoryStatus; /**< The function pointer of set memory status. */ @@ -1104,10 +1102,10 @@ struct _MSG_PLUGIN_HANDLER_S MsgPlgRestoreMsg pfRestoreMsg; MsgPlgAddMessage pfAddMessage; /**< The function pointer of add Message. */ MsgPlgProcessReceivedInd pfProcessReceivedInd; /**< The function pointer of Process Notification Ind. */ - MsgPlgUpdateMessage pfUpdateMessage; /**< The function pointer of Update MMS Message */ - MsgPlgGetMmsMessage pfGetMmsMessage; + MsgPlgUpdateMessage pfUpdateMessage; /**< The function pointer of Update MMS Message */ + MsgPlgGetMmsMessage pfGetMmsMessage; MsgPlgUpdateRejectStatus pfUpdateRejectStatus; - MsgPlgComposeReadReport pfComposeReadReport; + MsgPlgComposeReadReport pfComposeReadReport; MsgPlgGetDefaultNetworkSimId pfGetDefaultNetworkSimId; }; diff --git a/include/common/MsgQueue.h b/include/common/MsgQueue.h index d1a06c2..21ad9a9 100755 --- a/include/common/MsgQueue.h +++ b/include/common/MsgQueue.h @@ -25,7 +25,7 @@ template <typename T> class MsgSimpleQ { public: - MsgSimpleQ(){}; + MsgSimpleQ() {}; void pop_front(); bool front(T* qItem); void push_front(T const & input); @@ -34,7 +34,7 @@ public: bool empty(); void clear(); bool checkExist(T const & qItem, bool(cmp)(T const &, T const &)); - void remove(T const & qItem, bool(cmp)(T const &, T const &) ); + void remove(T const & qItem, bool(cmp)(T const &, T const &)); private: std::list <T> q; }; @@ -42,7 +42,7 @@ private: template <typename T> void MsgSimpleQ<T>::pop_front() { - if(q.empty()) return; + if (q.empty()) return; q.pop_front(); } @@ -50,7 +50,7 @@ void MsgSimpleQ<T>::pop_front() template <typename T> bool MsgSimpleQ<T>::front(T* qItem) { - if( qItem == NULL || q.empty() ) + if (qItem == NULL || q.empty()) return false; /* Fail */ *qItem = q.front(); /* copy */ diff --git a/include/common/MsgSettingTypes.h b/include/common/MsgSettingTypes.h index a3a8488..6ff8fdf 100755 --- a/include/common/MsgSettingTypes.h +++ b/include/common/MsgSettingTypes.h @@ -18,9 +18,9 @@ #define MSG_SETTING_TYPES_H /** - * @file MsgSettingTypes.h - * @brief Defines setting types of messaging framework - * @version 1.0 + * @file MsgSettingTypes.h + * @brief Defines setting types of messaging framework + * @version 1.0 */ /** @@ -31,7 +31,7 @@ */ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgTypes.h" #include "MsgStorageTypes.h" @@ -43,7 +43,7 @@ */ /*================================================================================================== - TYPES + TYPES ==================================================================================================*/ /** @@ -193,14 +193,13 @@ typedef int MSG_RINGTONE_TYPE_T; /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ /** * @brief Represents SMSC address information. */ -typedef struct -{ +typedef struct { MSG_SMS_TON_T ton; /**< Type of number */ MSG_SMS_NPI_T npi; /**< Numbering plan ID */ char address[SMSC_ADDR_MAX+1]; /**< SMSC address */ @@ -210,8 +209,7 @@ typedef struct /** * @brief Represents SMSC data information. */ -typedef struct -{ +typedef struct { MSG_SMS_PID_T pid; /**< Protocol idendifier */ MSG_VAL_PERIOD_T valPeriod; /**< Validity period value */ char name[SMSC_NAME_MAX+1]; /**< SMSC name */ @@ -222,36 +220,33 @@ typedef struct /** * @brief Represents an SMSC list. */ -typedef struct -{ +typedef struct { int index; /**< SMSC index for Updating information */ int selected; /**< Selected SMSC index */ int totalCnt; /**< The count of total SMSC addresses */ MSG_SMSC_DATA_S smscData[SMSC_LIST_MAX]; /**< SMSC data information list*/ - msg_sim_slot_id_t simIndex; -}MSG_SMSC_LIST_S; + msg_sim_slot_id_t simIndex; +} MSG_SMSC_LIST_S; /** * @brief Represents an SMSC list. */ -typedef struct -{ +typedef struct { int index; /**< SMSC index for Updating information */ int selected; /**< Selected SMSC index */ msg_struct_list_s *smsc_list; /**< SMSC data information list*/ - msg_sim_slot_id_t simIndex; -}MSG_SMSC_LIST_HIDDEN_S; + msg_sim_slot_id_t simIndex; +} MSG_SMSC_LIST_HIDDEN_S; /** * @brief Represents the information of a cell broadcasting channel. */ -typedef struct -{ +typedef struct { bool bActivate; /**< Indicates whether the CB channel is activate or passive. */ - unsigned int from; /**< Indicates the start ID of a CB channel range. */ - unsigned int to; /**< Indicates the end ID of a CB channel range. */ + unsigned int from; /**< Indicates the start ID of a CB channel range. */ + unsigned int to; /**< Indicates the end ID of a CB channel range. */ unsigned short ctg; /**< Indicates the category of a CB. (for 3gpp2)*/ unsigned short lang; /**< Indicates the language of a CB. (for 3gpp2)*/ char name[CB_CHANNEL_NAME_MAX+1]; /**< Indicates the name of a CB channel. */ @@ -261,8 +256,7 @@ typedef struct /** * @brief Represents cell broadcasting channel information. */ -typedef struct -{ +typedef struct { int channelCnt; /**< The count of CB channels */ MSG_CB_CHANNEL_INFO_S channelInfo[CB_CHANNEL_MAX]; /**< The structure of CB channel information */ } MSG_CB_CHANNEL_S; @@ -271,41 +265,38 @@ typedef struct /** * @brief Represents an general option. */ -typedef struct -{ +typedef struct { bool bKeepCopy; /**< Indicates whether the SMS message copy is kept or not. */ MSG_ALERT_TONE_T alertTone; /**< Indicates the period of playing alert tone. */ bool bAutoErase; /**< Indicates whether the auto-erase option is enabled or not. */ bool bBlockUnknownMsg; /**< Indicates whether unknown sender message is blocked or not. */ int smsLimitCnt; /**< Indicates the count limitation of sms messages in one conversation */ int mmsLimitCnt; /**< Indicates the count limitation of sms messages in one conversation */ - bool bNotification; /**< Indicates whether notification for incoming message is shown or not. */ + bool bNotification; /**< Indicates whether notification for incoming message is shown or not. */ bool bVibration; /**< Indicates whether vibration for incoming message is run or not. */ bool bPreview; /**< Indicates whether preview for incoming message is shown or not. */ - char ringtonePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the message ringtone path */ - int ringtoneType; /**< Indicates the message ringtone type. */ -}MSG_GENERAL_OPT_S; + char ringtonePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the message ringtone path */ + int ringtoneType; /**< Indicates the message ringtone type. */ +} MSG_GENERAL_OPT_S; /** * @brief Represents an SMS send option. */ -typedef struct -{ +typedef struct { msg_encode_type_t dcs; /**< Indicates the string encoding type. */ MSG_SMS_NETWORK_MODE_T netMode; /**< Indicates the network mode (CS/PS) to send SMS. */ bool bReplyPath; /**< Indicates whether the SMS reply path is set or not. */ bool bDeliveryReport; /**< Indicates whether the SMS delivery report will be sent or not. */ MSG_SMS_SAVE_STORAGE_T saveStorage; /**< Indicates the default storage to save SMS. */ -}MSG_SMS_SENDOPT_S; +} MSG_SMS_SENDOPT_S; /** * @brief Represents an MMS send option. */ -typedef struct -{ - MSG_MMS_MSG_CLASS_TYPE_T msgClass; +typedef struct { + MSG_MMS_MSG_CLASS_TYPE_T msgClass; msg_priority_type_t priority; /**< Indicates the priority of the message. */ MSG_MMS_EXPIRY_TIME_T expiryTime; /**< Indicates the time when the message is to be removed from the MMSC. */ MSG_MMS_DELIVERY_TIME_T deliveryTime; /**< Indicates the message transmission time which is set in the MMSC. */ @@ -317,7 +308,7 @@ typedef struct bool bBodyReplying; /**< Indicates whether the body is included when replying or not. */ bool bHideRecipients; /**< Indicates whether the recipients are hidden or not. */ - MSG_MMS_REPLY_CHARGING_TYPE_T replyCharging; + MSG_MMS_REPLY_CHARGING_TYPE_T replyCharging; unsigned int replyChargingDeadline; unsigned int /*long*/ replyChargingSize; @@ -328,8 +319,7 @@ typedef struct /** * @brief Represents an MMS receive option. */ -typedef struct -{ +typedef struct { MSG_MMS_HOME_RETRIEVE_TYPE_T homeNetwork; /**< Indicates the retrieve type for MMS home network. */ MSG_MMS_ABROAD_RETRIEVE_TYPE_T abroadNetwork; /**< Indicates the retrieve type for MMS abroad network. */ #if 0 @@ -345,8 +335,7 @@ typedef struct /** * @brief Represents an MMS style option. */ -typedef struct -{ +typedef struct { unsigned int fontSize; bool bFontStyleBold; bool bFontStyleItalic; @@ -368,8 +357,7 @@ typedef struct /** * @brief Represents a push message option. */ -typedef struct -{ +typedef struct { bool bReceive; /**< Indicates whether the push message is received or not. */ MSG_PUSH_SERVICE_TYPE_T serviceType; /**< Indicates the service type of a push message. */ } MSG_PUSHMSG_OPT_S; @@ -378,8 +366,7 @@ typedef struct /** * @brief Represents a cell broadcasting message option. */ -typedef struct -{ +typedef struct { bool bReceive; /**< Indicates whether the CB message is received or not. */ int maxSimCnt; /**< Indicates the number of channels which can be stored in SIM. */ MSG_CB_CHANNEL_S channelData; /**< Indicates the cell broadcasting channel information. */ @@ -387,8 +374,7 @@ typedef struct msg_sim_slot_id_t simIndex; } MSG_CBMSG_OPT_S; -typedef struct -{ +typedef struct { bool bReceive; /**< Indicates whether the CB message is received or not. */ int maxSimCnt; /**< Indicates the number of channels which can be stored in SIM. */ msg_struct_list_s *channelData; /**< Indicates the cell broadcasting channel information. */ @@ -400,8 +386,7 @@ typedef struct /** * @brief Represents a voice mail number option. */ -typedef struct -{ +typedef struct { char mailNumber[MAX_PHONE_NUMBER_LEN+1]; char alpahId[MAX_SIM_XDN_ALPHA_ID_LEN+1]; msg_sim_slot_id_t simIndex; @@ -412,8 +397,7 @@ typedef struct /** * @brief Represents a MMS size option. */ -typedef struct -{ +typedef struct { int nMsgSize; } MSG_MSGSIZE_OPT_S; @@ -421,8 +405,7 @@ typedef struct /** * @brief Represents setting information. */ -typedef struct -{ +typedef struct { MSG_OPTION_TYPE_T type; /**< The option type in a setting */ union { @@ -437,7 +420,7 @@ typedef struct MSG_VOICEMAIL_OPT_S voiceMailOpt; /**< voice mail option */ MSG_MSGSIZE_OPT_S msgSizeOpt; /**< MMS size option */ } option; -}MSG_SETTING_S; +} MSG_SETTING_S; /** diff --git a/include/common/MsgStorageTypes.h b/include/common/MsgStorageTypes.h index 6332864..4912806 100755 --- a/include/common/MsgStorageTypes.h +++ b/include/common/MsgStorageTypes.h @@ -19,9 +19,9 @@ /** - * @file MsgStorageTypes.h - * @brief Defines transport types of messaging framework - * @version 1.0 + * @file MsgStorageTypes.h + * @brief Defines transport types of messaging framework + * @version 1.0 */ @@ -33,7 +33,7 @@ */ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <time.h> @@ -48,14 +48,13 @@ * @{ */ /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ /** * @brief Represents the count of read/unread messages. */ -typedef struct -{ +typedef struct { int nReadCnt; /**< The count of read messages */ int nUnreadCnt; /**< The count of unread messages */ int nSms; /**< The count of sms type messages */ @@ -66,9 +65,8 @@ typedef struct /** * @brief Represents a reject message information. */ -typedef struct -{ - msg_message_id_t msgId; /**< Indicates the unique message ID. */ +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; @@ -77,10 +75,9 @@ typedef struct /** * @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. */ +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; @@ -88,16 +85,15 @@ typedef struct /** * @brief Represents contact information. */ -typedef struct -{ +typedef struct { msg_contact_id_t contactId; /**< Indicates the unique contact ID. */ int addrbookId; /**< Indicates the address book 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 middleName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the middle name of contact. */ - char prefix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the prefix of contact. */ - char suffix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the suffix of contact. */ - char imagePath[MAX_IMAGE_PATH_LEN+1]; /**< Indicates the image path of contact. */ + 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 middleName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the middle name of contact. */ + char prefix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the prefix of contact. */ + char suffix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the suffix of contact. */ + char imagePath[MAX_IMAGE_PATH_LEN+1]; /**< Indicates the image path of contact. */ char alerttonePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the message alert tone path of contact. */ char vibrationPath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the vibration path of contact. */ } MSG_CONTACT_INFO_S; @@ -108,18 +104,16 @@ typedef struct * The sort rule structure includes a sort type and a sort order. \n * Applications can use the sort rule when querying messages. */ -typedef struct -{ +typedef struct { msg_sort_type_t sortType; /**< Indicates the sort type, See enum _MSG_SORT_TYPE_E */ bool bAscending; /**< Indicates the sort order which is ascending or descending */ -}MSG_SORT_RULE_S; +} MSG_SORT_RULE_S; /** * @brief Represents SIM ID List. */ -typedef struct -{ +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; @@ -128,8 +122,7 @@ typedef struct /** * @brief Represents recipien list information. */ -typedef struct -{ +typedef struct { int recipientCnt; MSG_ADDRESS_INFO_S* recipientAddr; } MSG_RECIPIENTS_LIST_S; @@ -138,8 +131,7 @@ typedef struct /** * @brief Represents Message list condition values. */ -typedef struct -{ +typedef struct { msg_folder_id_t folderId; msg_thread_id_t threadId; msg_storage_id_t storageId; @@ -158,8 +150,7 @@ typedef struct } MSG_LIST_CONDITION_S; -typedef struct -{ +typedef struct { int appcode; char appid[MAX_WAPPUSH_ID_LEN]; } PUSH_APPLICATION_INFO_S; diff --git a/include/common/MsgThread.h b/include/common/MsgThread.h index 88d1875..fcaf6a0 100755 --- a/include/common/MsgThread.h +++ b/include/common/MsgThread.h @@ -19,20 +19,21 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <pthread.h> #include "MsgDebug.h" /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class MsgThread { public: MsgThread(): thd(0) {}; - virtual void start() { + virtual void start() + { MSG_DEBUG("MsgThread::Start() called"); if (pthread_create(&thd, NULL, &MsgThread::thdMain, this) < 0) { @@ -43,18 +44,21 @@ public: pthread_detach(thd); } - virtual void stop() { + virtual void stop() + { MSG_DEBUG("MsgThread::stop() called"); } - void wait() { + void wait() + { MSG_DEBUG("MsgThread::Wait() called"); void* pData; pthread_join(thd, &pData); } private: - static void* thdMain(void* pInst) { + static void* thdMain(void* pInst) + { MSG_DEBUG("MsgThread::thdMain() called"); MsgThread* pt = static_cast<MsgThread*>(pInst); pt->run(); @@ -67,5 +71,5 @@ private: }; -#endif //__MSG_THREAD_H__ +#endif /* __MSG_THREAD_H__ */ diff --git a/include/common/MsgTransportTypes.h b/include/common/MsgTransportTypes.h index c8ebbe4..2e7185b 100755 --- a/include/common/MsgTransportTypes.h +++ b/include/common/MsgTransportTypes.h @@ -18,9 +18,9 @@ #define MSG_TRANSPORT_TYPES_H /** - * @file MsgTransportTypes.h - * @brief Defines transport types of messaging framework - * @version 1.0 + * @file MsgTransportTypes.h + * @brief Defines transport types of messaging framework + * @version 1.0 */ /** @@ -31,7 +31,7 @@ */ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgTypes.h" #include "MsgStorageTypes.h" @@ -47,22 +47,21 @@ /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ /** * @brief Represents the status of a sent message. \n * This stucture contains the information about the status of a sent message that application has submitted to the framework. */ -typedef struct -{ +typedef struct { msg_request_id_t reqId; /**< Indicates the corresponding request Id. */ msg_network_status_t status; /**< Indicates the status of the corresponding request. Refer to enum _MSG_NETWORK_STATUS_E*/ } MSG_SENT_STATUS_S; /*================================================================================================== - TYPES + TYPES ==================================================================================================*/ diff --git a/include/common/MsgTypes.h b/include/common/MsgTypes.h index 6f67b08..12da13d 100755 --- a/include/common/MsgTypes.h +++ b/include/common/MsgTypes.h @@ -18,9 +18,9 @@ #define MSG_TYPES_H /** - * @file MsgTypes.h - * @brief Defines common types of messaging framework - * @version 1.0 + * @file MsgTypes.h + * @brief Defines common types of messaging framework + * @version 1.0 */ /** @@ -31,7 +31,7 @@ */ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <stdlib.h> #include <stdio.h> @@ -47,7 +47,7 @@ */ /*================================================================================================== - TYPES + TYPES ==================================================================================================*/ /** @@ -75,18 +75,17 @@ typedef struct _msg_struct { int type; void *data; -}msg_struct_s; +} msg_struct_s; /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ /** * @brief Represents address information. */ -typedef struct -{ +typedef struct { msg_address_type_t addressType; /**< The type of an address in case of an Email or a mobile phone */ msg_recipient_type_t recipientType; /**< The type of recipient address in case of To, Cc, and Bcc */ msg_contact_id_t contactId; /**< The contact ID of address */ @@ -98,8 +97,7 @@ typedef struct /** * @brief Represents port number information. */ -typedef struct -{ +typedef struct { bool valid; /**< Indicates whether port information is used or not. */ unsigned short dstPort; /**< Recipient port number, not greater than 16 bit */ unsigned short srcPort; /**< Sender port number, not greater than 16 bit */ @@ -109,8 +107,7 @@ typedef struct /** * @brief Represents MMS Sending Option Structure in application. */ -typedef struct -{ +typedef struct { bool bReadReq; time_t expiryTime; bool bUseDeliveryCustomTime; @@ -122,8 +119,7 @@ typedef struct /** * @brief Represents SMS Sending Option Structure in application. */ -typedef struct -{ +typedef struct { bool bReplyPath; } SMS_SENDINGOPT_S; @@ -131,8 +127,7 @@ typedef struct /** * @brief Represents MSG Sending Option Structure in application. */ -typedef struct -{ +typedef struct { bool bSetting; bool bDeliverReq; bool bKeepCopy; @@ -141,27 +136,24 @@ typedef struct } MSG_SENDINGOPT_S; -typedef enum -{ +typedef enum { MMS_TIMETYPE_NONE = -1, /**< fixme: backward compatibility */ MMS_TIMETYPE_ERROR = -1, /**< error return in Get method */ MMS_TIMETYPE_RELATIVE = 0, /**< default */ MMS_TIMETYPE_ABSOLUTE = 1 -}MmsTimeType; +} MmsTimeType; -typedef struct -{ +typedef struct { MmsTimeType type; unsigned int time; -}MmsTimeStruct; +} MmsTimeStruct; /** * @brief Represents MMS Sending Option Structure in framework. */ -typedef struct -{ +typedef struct { bool bReadReq; bool bUseDeliveryCustomTime; msg_priority_type_t priority; @@ -173,8 +165,7 @@ typedef struct /** * @brief Represents SMS Sending Option Structure in framework. */ -typedef struct -{ +typedef struct { bool bReplyPath; } SMS_SENDINGOPT_INFO_S; @@ -182,15 +173,14 @@ typedef struct /** * @brief Represents MSG Sending Option Structure in framework. */ -typedef struct -{ +typedef struct { bool bSetting; bool bDeliverReq; bool bKeepCopy; union { - MMS_SENDINGOPT_INFO_S mmsSendOptInfo; - SMS_SENDINGOPT_INFO_S smsSendOptInfo; + MMS_SENDINGOPT_INFO_S mmsSendOptInfo; + SMS_SENDINGOPT_INFO_S smsSendOptInfo; } option; } MSG_SENDINGOPT_INFO_S; @@ -200,8 +190,7 @@ typedef struct * Applications compose a request and send it to the framework via Message handle. \n * This request ID is used to manage the request by the framework. */ -typedef struct -{ +typedef struct { msg_request_id_t reqId; /**< Indicates the request ID, which is unique. When applications submit a request to the framework, this value will be set by the framework. */ msg_struct_t msg; /**< Indicates the message structure to be sent by applications. */ @@ -213,14 +202,12 @@ typedef struct * @brief Represents Address information list. */ -typedef struct -{ +typedef struct { msg_contact_id_t contactId; /**< The contact id of message common informatioin */ MSG_ADDRESS_INFO_S msgAddrInfo; /**< The pointer to message common informatioin */ } MSG_THREAD_LIST_INDEX_S; -typedef struct -{ +typedef struct { msg_contact_id_t contactId; /**< The contact id of message common informatioin */ msg_struct_t msgAddrInfo; /**< The pointer to message common informatioin */ } MSG_THREAD_LIST_INDEX_INFO_S; @@ -229,21 +216,19 @@ typedef struct /** * @brief Represents Peer Count Info. */ -typedef struct -{ +typedef struct { int totalCount; /**< Indicates the total number of messages from the Peer. */ int unReadCount; /**< Indicates the unread messages from the Peer. */ int smsMsgCount; /**< Indicates the SMS messages from the Peer. */ int mmsMsgCount; /**< Indicates the MMS messages from the Peer. */ -}MSG_THREAD_COUNT_INFO_S; +} MSG_THREAD_COUNT_INFO_S; /** * @brief Represents the request information of Push Message (SI, SL). */ -typedef struct -{ - msg_push_action_t action; +typedef struct { + msg_push_action_t action; unsigned long received; unsigned long created; unsigned long expires; @@ -256,8 +241,7 @@ typedef struct /** * @brief Represents the request information of Push Message (CO). */ -typedef struct -{ +typedef struct { int invalObjectCnt; int invalServiceCnt; char invalObjectUrl[MAX_PUSH_CACHEOP_INVALID_OBJECT_MAX][MAX_PUSH_CACHEOP_MAX_URL_LEN + 1]; @@ -268,53 +252,48 @@ typedef struct /** * @brief Represents the SyncML Message Information. */ -typedef struct -{ +typedef struct { int extId; int pinCode; msg_struct_t msg; -}MSG_SYNCML_MESSAGE_S; +} MSG_SYNCML_MESSAGE_S; /** * @brief Represents the SyncML Message Data. */ - typedef struct -{ - msg_syncml_message_type_t syncmlType; - int pushBodyLen; - char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1]; - int wspHeaderLen; - char wspHeader[MAX_WAPPUSH_CONTENTS_LEN + 1]; - int simIndex; -}MSG_SYNCML_MESSAGE_DATA_S; +typedef struct { + msg_syncml_message_type_t syncmlType; + int pushBodyLen; + char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1]; + int wspHeaderLen; + char wspHeader[MAX_WAPPUSH_CONTENTS_LEN + 1]; + int simIndex; +} MSG_SYNCML_MESSAGE_DATA_S; /** * @brief Represents the SyncML Message Data. */ - typedef struct -{ +typedef struct { char pushHeader[MAX_WAPPUSH_CONTENTS_LEN + 1]; - int pushBodyLen; + int pushBodyLen; char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1]; -}MSG_LBS_MESSAGE_DATA_S; +} MSG_LBS_MESSAGE_DATA_S; -typedef struct -{ +typedef struct { char pushHeader[MAX_WAPPUSH_CONTENTS_LEN + 1]; - int pushBodyLen; + int pushBodyLen; char pushBody[MAX_WAPPUSH_CONTENTS_LEN + 1]; char pushAppId[MAX_WAPPUSH_ID_LEN + 1]; char pushContentType[MAX_WAPPUSH_CONTENT_TYPE_LEN + 1]; -}MSG_PUSH_MESSAGE_DATA_S; +} MSG_PUSH_MESSAGE_DATA_S; /** * @brief Represents the Report Status Data. */ -typedef struct -{ +typedef struct { char addressVal[MAX_ADDRESS_VAL_LEN + 1]; int type; int status; @@ -322,17 +301,15 @@ typedef struct } MSG_REPORT_STATUS_INFO_S; -typedef struct -{ +typedef struct { char contentType[MAX_WAPPUSH_CONTENT_TYPE_LEN + 1]; char appId[MAX_WAPPUSH_ID_LEN + 1]; char pkgName[MSG_FILEPATH_LEN_MAX + 1]; bool bLaunch; -}MSG_PUSH_EVENT_INFO_S; +} MSG_PUSH_EVENT_INFO_S; -typedef struct -{ +typedef struct { msg_message_id_t msg_id; char mime_type[MAX_MIME_TYPE_LEN+1]; char media_item[MSG_FILEPATH_LEN_MAX+1]; diff --git a/include/externals/MsgAlarm.h b/include/externals/MsgAlarm.h index f125515..fa31014 100755 --- a/include/externals/MsgAlarm.h +++ b/include/externals/MsgAlarm.h @@ -21,13 +21,13 @@ #include "MsgTypes.h" /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ typedef void (*msg_alarm_cb)(int alarmId); /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t MsgAlarmRegistration(struct tm *timeInfo, msg_alarm_cb userCB, int *alarmId); msg_error_t MsgAlarmRemove(int alarmId); diff --git a/include/externals/MsgLbs.h b/include/externals/MsgLbs.h index ff24ebf..7332ab3 100755 --- a/include/externals/MsgLbs.h +++ b/include/externals/MsgLbs.h @@ -18,17 +18,17 @@ #define MSGLBS_H_ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define MSG_LBS_PORT 7275 /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ void MsgLbsSms(const char *msgBody, int msgSize); void MsgLbsWapPush(const char *pushHeader, const char *pushBody, int pushBodySize); diff --git a/include/externals/MsgNotificationWrapper.h b/include/externals/MsgNotificationWrapper.h index f7776ad..cfc27a3 100755 --- a/include/externals/MsgNotificationWrapper.h +++ b/include/externals/MsgNotificationWrapper.h @@ -18,12 +18,12 @@ #define MSG_NOTIFICATION_WRAPPER_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgInternalTypes.h" /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define MSG_APP_PACKAGE_NAME "message" @@ -87,8 +87,7 @@ enum _msg_active_notification_type_e { MSG_ACTIVE_NOTI_TYPE_INSTANT, }; -enum _MSG_SOUND_TYPE_E -{ +enum _MSG_SOUND_TYPE_E { MSG_SOUND_PLAY_DEFAULT = 0, MSG_SOUND_PLAY_USER, MSG_SOUND_PLAY_EMERGENCY, diff --git a/include/externals/MsgSensorWrapper.h b/include/externals/MsgSensorWrapper.h index 8a6bc57..f0e7c7c 100755 --- a/include/externals/MsgSensorWrapper.h +++ b/include/externals/MsgSensorWrapper.h @@ -21,13 +21,13 @@ #include "MsgTypes.h" /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ typedef void (*msg_sensor_cb)(); /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ void MsgInitSensor(); diff --git a/include/externals/MsgSpamFilter.h b/include/externals/MsgSpamFilter.h index beba140..571398c 100755 --- a/include/externals/MsgSpamFilter.h +++ b/include/externals/MsgSpamFilter.h @@ -18,7 +18,7 @@ #define MSG_SPAM_FILTER_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgFilterTypes.h" #include "MsgStorageTypes.h" @@ -27,7 +27,7 @@ /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t MsgSetFilterOperation(bool bSetFlag); msg_error_t MsgGetFilterOperation(bool *pSetFlag); diff --git a/include/framework/MsgCmdHandler.h b/include/framework/MsgCmdHandler.h index 4082cfa..f5b9536 100755 --- a/include/framework/MsgCmdHandler.h +++ b/include/framework/MsgCmdHandler.h @@ -18,14 +18,14 @@ #define MSG_CMD_HANDLER_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgCmdTypes.h" #include "MsgInternalTypes.h" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ int MsgAddMessageHandler(const MSG_CMD_S *pCmd, char **ppEvent); int MsgAddSyncMLMessageHandler(const MSG_CMD_S *pCmd, char **ppEvent); diff --git a/include/framework/MsgDeliverHandler.h b/include/framework/MsgDeliverHandler.h index b18a97e..113f98d 100755 --- a/include/framework/MsgDeliverHandler.h +++ b/include/framework/MsgDeliverHandler.h @@ -18,14 +18,14 @@ #define MSG_DELIVER_HANDLER_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgPluginInterface.h" #include "MsgTypes.h" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t MsgHandleMmsConfIncomingMsg(MSG_MESSAGE_INFO_S *pMsgInfo, msg_request_id_t reqID); msg_error_t MsgHandleIncomingMsg(MSG_MESSAGE_INFO_S *pMsgInfo, bool *pSendNoti); diff --git a/include/framework/MsgPluginManager.h b/include/framework/MsgPluginManager.h index f440a4a..25ec2ff 100755 --- a/include/framework/MsgPluginManager.h +++ b/include/framework/MsgPluginManager.h @@ -18,7 +18,7 @@ #define MSG_PLUGIN_MANAGER_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <map> @@ -27,12 +27,12 @@ #include "MsgCppTypes.h" /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class MsgPlugin { @@ -72,19 +72,19 @@ public: msg_error_t restoreMsg(MSG_MESSAGE_INFO_S *pMsgInfo, char* pRecvBody, int rcvdBodyLen, char* filePath); operator void*() const { - return (mSupportedMsg == MSG_UNKNOWN_TYPE)? NULL:(void*) this; + return (mSupportedMsg == MSG_UNKNOWN_TYPE) ? NULL:(void*) this; } private: - MSG_MAIN_TYPE_T mSupportedMsg; - MSG_PLUGIN_HANDLER_S mPlgHandler; + MSG_MAIN_TYPE_T mSupportedMsg; + MSG_PLUGIN_HANDLER_S mPlgHandler; void *mLibHandler; /* plugin library pointer */ }; /*================================================================================================== - GLOBAL VARIABLES + GLOBAL VARIABLES ==================================================================================================*/ typedef std::map<MSG_MAIN_TYPE_T, MsgPlugin*> MsgPluginMap; @@ -93,14 +93,14 @@ typedef struct { const char *path; } MSG_PLG_TABLE_T; -const static MSG_PLG_TABLE_T __msg_plg_items[] = { +static const MSG_PLG_TABLE_T __msg_plg_items[] = { { MSG_SMS_TYPE, "/usr/lib/libmsg_sms_plugin.so" }, { MSG_MMS_TYPE, "/usr/lib/libmsg_mms_plugin.so" } }; /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class MsgPluginManager { diff --git a/include/framework/MsgSettingHandler.h b/include/framework/MsgSettingHandler.h index b6ce6a2..a54b2db 100755 --- a/include/framework/MsgSettingHandler.h +++ b/include/framework/MsgSettingHandler.h @@ -19,13 +19,13 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgSettingTypes.h" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t MsgSetConfigData(const MSG_SETTING_S *pSetting); msg_error_t MsgGetConfigData(MSG_SETTING_S *pSetting); diff --git a/include/framework/MsgStorageHandler.h b/include/framework/MsgStorageHandler.h index 728e7fe..ffcdc9b 100755 --- a/include/framework/MsgStorageHandler.h +++ b/include/framework/MsgStorageHandler.h @@ -18,7 +18,7 @@ #define MSG_STORAGE_HANDLER_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgStorageTypes.h" #include "MsgSettingTypes.h" @@ -28,7 +28,7 @@ #include "MsgInternalTypes.h" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t MsgStoConnectDB(); msg_error_t MsgStoDisconnectDB(); diff --git a/include/framework/MsgSubmitHandler.h b/include/framework/MsgSubmitHandler.h index bb5c888..62e713d 100755 --- a/include/framework/MsgSubmitHandler.h +++ b/include/framework/MsgSubmitHandler.h @@ -19,13 +19,13 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgInternalTypes.h" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t MsgSubmitReq(MSG_REQUEST_INFO_S* pReq, bool bScheduled); msg_error_t MsgSubmitReqSMS(MSG_REQUEST_INFO_S *pReqInfo); diff --git a/include/framework/MsgTransManager.h b/include/framework/MsgTransManager.h index 38699a6..7f8413f 100755 --- a/include/framework/MsgTransManager.h +++ b/include/framework/MsgTransManager.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <list> #include <map> @@ -38,7 +38,7 @@ /*================================================================================================== - DEFINITION + DEFINITION ==================================================================================================*/ typedef std::map<MSG_CMD_TYPE_T, int (*)(const MSG_CMD_S*, char**)> handler_map; typedef std::map<int, MSG_PROXY_INFO_S> sentmsg_map; @@ -54,7 +54,7 @@ typedef std::list<MSG_CMD_REG_SYNCML_MSG_OPERATION_CB_S> syncmlop_list; /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class MsgTransactionManager { @@ -62,7 +62,7 @@ public: static MsgTransactionManager* instance(); void run(); - void workerEventQueue(); + void workerEventQueue(); void write(int fd, const char* buf, int len); /* methods for sent status event */ @@ -82,7 +82,7 @@ public: void setStorageChangeCB(int listenerFd); void setReportMsgCB(int listenerFd); - javamms_list& getJavaMMSList(); + javamms_list &getJavaMMSList(); 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); diff --git a/include/mapi/msg.h b/include/mapi/msg.h index d824233..dabf215 100755 --- a/include/mapi/msg.h +++ b/include/mapi/msg.h @@ -18,14 +18,14 @@ #define MSG_H_ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <stdbool.h> #include "msg_types.h" /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ /** @@ -44,7 +44,7 @@ extern "C" #endif /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ /** diff --git a/include/mapi/msg_private.h b/include/mapi/msg_private.h index a24287e..d5a011e 100755 --- a/include/mapi/msg_private.h +++ b/include/mapi/msg_private.h @@ -18,7 +18,7 @@ #define MSG_PRIVATE_H_ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgDebug.h" @@ -32,7 +32,7 @@ #include "MsgUtilFunction.h" /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define CHECK_MSG_SUPPORTED(feature_name) \ @@ -56,7 +56,7 @@ } while (0) /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ /* message */ diff --git a/include/mapi/msg_storage.h b/include/mapi/msg_storage.h index f7d2471..52fe33e 100755 --- a/include/mapi/msg_storage.h +++ b/include/mapi/msg_storage.h @@ -18,7 +18,7 @@ #define MAPI_STORAGE_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "msg_storage_types.h" @@ -63,7 +63,7 @@ extern "C" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ /** @@ -1185,5 +1185,5 @@ int msg_db_free(msg_handle_t handle, char **db_res); } #endif -#endif // MAPI_STORAGE_H +#endif /* MAPI_STORAGE_H */ diff --git a/include/mapi/msg_storage_types.h b/include/mapi/msg_storage_types.h index 60d5545..8a740df 100755 --- a/include/mapi/msg_storage_types.h +++ b/include/mapi/msg_storage_types.h @@ -18,13 +18,13 @@ #define MSG_STORAGE_TYPES_H_ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "msg_types.h" /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ /** @@ -39,11 +39,11 @@ typedef struct { int nCount; /**< The count of message ID information */ msg_message_id_t *msgIdList; /**< The pointer to message ID information */ -}msg_id_list_s; +} msg_id_list_s; /*================================================================================================== - TYPES + TYPES ==================================================================================================*/ /** @@ -96,7 +96,7 @@ typedef void (*msg_storage_change_cb)(msg_handle_t handle, msg_storage_change_ty /*================================================================================================== - ENUMS + ENUMS ==================================================================================================*/ /** @@ -135,8 +135,8 @@ enum _MSG_FOLDER_ID_E { enum _MSG_FOLDER_TYPE_E { MSG_FOLDER_TYPE_INBOX = 1, /**< Inbox folder */ MSG_FOLDER_TYPE_OUTBOX, /**< Outbox folder */ - MSG_FOLDER_TYPE_DRAFT, /**< Draft folder */ - MSG_FOLDER_TYPE_SPAMBOX, /**< Spambox folder */ + MSG_FOLDER_TYPE_DRAFT, /**< Draft folder */ + MSG_FOLDER_TYPE_SPAMBOX, /**< Spambox folder */ MSG_FOLDER_TYPE_USER_DEF /**< Folder which is created by a user */ }; diff --git a/include/mapi/msg_transport.h b/include/mapi/msg_transport.h index 9badbe7..dbedc18 100755 --- a/include/mapi/msg_transport.h +++ b/include/mapi/msg_transport.h @@ -18,7 +18,7 @@ #define MAPI_TRANSPORT_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "msg_transport_types.h" @@ -67,7 +67,7 @@ extern "C" */ /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ /** diff --git a/include/mapi/msg_transport_types.h b/include/mapi/msg_transport_types.h index 2bd4c2c..21a90aa 100755 --- a/include/mapi/msg_transport_types.h +++ b/include/mapi/msg_transport_types.h @@ -18,7 +18,7 @@ #define MSG_TRANSPORT_TYPES_H_ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "msg_types.h" @@ -31,7 +31,7 @@ /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ /** @brief Called when the status of the message which is already sent is changed. diff --git a/include/mapi/msg_types.h b/include/mapi/msg_types.h index c54f590..9f7771f 100755 --- a/include/mapi/msg_types.h +++ b/include/mapi/msg_types.h @@ -18,7 +18,7 @@ #define MSG_TYPES_H_ /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define DEPRECATED __attribute__((deprecated)) @@ -275,7 +275,7 @@ #define MAX_MIME_TYPE_LEN 64 /*================================================================================================== - TYPES + TYPES ==================================================================================================*/ /** @@ -297,9 +297,9 @@ typedef struct msg_list_handle *msg_list_handle_t; * @brief The structure type representing a message structure list. */ typedef struct { - int nCount; /**< The count of #msg_struct_t */ - msg_struct_t *msg_struct_info; /**< The #msg_struct_t information list */ -}msg_struct_list_s; + int nCount; /**< The count of #msg_struct_t */ + msg_struct_t *msg_struct_info; /**< The #msg_struct_t information list */ +} msg_struct_list_s; /** @@ -450,7 +450,7 @@ typedef unsigned char msg_filter_type_t; /*================================================================================================== - ENUMS + ENUMS ==================================================================================================*/ /** @@ -1156,9 +1156,9 @@ enum _MSG_CLASS_TYPE_E { * This enum is used as the value of msg_message_type_t. */ enum _MSG_MESSAGE_TYPE_E { - MSG_TYPE_INVALID = 0, /** < Invalid Type Message */ + MSG_TYPE_INVALID = 0, /** < Invalid Type Message */ - MSG_TYPE_SMS, /** < Normal SMS Message */ + MSG_TYPE_SMS, /** < Normal SMS Message */ MSG_TYPE_SMS_CB, /** < Cell Broadcasting SMS Message */ MSG_TYPE_SMS_JAVACB, /** < JAVA Cell Broadcasting SMS Message */ MSG_TYPE_SMS_WAPPUSH, /** < WAP Push SMS Message */ @@ -1407,8 +1407,8 @@ enum _MSG_PUSH_ACTION_E { * @brief Enumeration for the type of SyncML Message. \n * This enum is used as the value of msg_syncml_message_type_t. */ - enum _MSG_SYNCML_MESSAGE_TYPE_E { - DM_WBXML, /** < DM WBXML SyncML Message */ +enum _MSG_SYNCML_MESSAGE_TYPE_E { + DM_WBXML, /** < DM WBXML SyncML Message */ DM_XML, /** < DM XML SyncML Message */ DM_NOTIFICATION, /** < DM Notification SyncML Message */ @@ -1419,25 +1419,25 @@ enum _MSG_PUSH_ACTION_E { CP_WBXML, /** < CP WBXML SyncML Message */ OTHERS, /** < Unknown SyncML Message */ - }; +}; /** * @brief Enumeration for the values of a Delivery Report Status. \n * This enum is used as the value of msg_delivery_report_status_t. */ - enum _MSG_DELIVERY_REPORT_STATUS_E { - MSG_DELIVERY_REPORT_NONE = -1, /**< Indicates the status unavailable */ - MSG_DELIVERY_REPORT_EXPIRED = 0, /**< Indicates the expired status of message */ - MSG_DELIVERY_REPORT_SUCCESS = 1, /**< Indicates the success status of message */ - MSG_DELIVERY_REPORT_REJECTED = 2, /**< Indicates the rejected status of message */ - MSG_DELIVERY_REPORT_DEFERRED = 3, /**< Indicates the deferred status of message */ - MSG_DELIVERY_REPORT_UNRECOGNISED = 4, /**< Indicates the unrecognized status of message */ - MSG_DELIVERY_REPORT_INDETERMINATE = 5, /**< Indicates the intermediate status of message */ - MSG_DELIVERY_REPORT_FORWARDED = 6, /**< Indicates the forwarded status of message */ - MSG_DELIVERY_REPORT_UNREACHABLE = 7, /**< Indicates the unreachable status of message */ - MSG_DELIVERY_REPORT_ERROR = 8, /**< Indicates the error status of message */ - }; +enum _MSG_DELIVERY_REPORT_STATUS_E { + MSG_DELIVERY_REPORT_NONE = -1, /**< Indicates the status unavailable */ + MSG_DELIVERY_REPORT_EXPIRED = 0, /**< Indicates the expired status of message */ + MSG_DELIVERY_REPORT_SUCCESS = 1, /**< Indicates the success status of message */ + MSG_DELIVERY_REPORT_REJECTED = 2, /**< Indicates the rejected status of message */ + MSG_DELIVERY_REPORT_DEFERRED = 3, /**< Indicates the deferred status of message */ + MSG_DELIVERY_REPORT_UNRECOGNISED = 4, /**< Indicates the unrecognized status of message */ + MSG_DELIVERY_REPORT_INDETERMINATE = 5, /**< Indicates the intermediate status of message */ + MSG_DELIVERY_REPORT_FORWARDED = 6, /**< Indicates the forwarded status of message */ + MSG_DELIVERY_REPORT_UNREACHABLE = 7, /**< Indicates the unreachable status of message */ + MSG_DELIVERY_REPORT_ERROR = 8, /**< Indicates the error status of message */ +}; /** @@ -1445,21 +1445,21 @@ enum _MSG_PUSH_ACTION_E { * This enum is used as the value of msg_read_report_status_t. */ enum _MSG_READ_REPORT_STATUS_E { - MSG_READ_REPORT_NONE = -1, /**< Indicates the status unavailable */ - MSG_READ_REPORT_IS_READ = 0, /**< Indicates the message is read */ - MSG_READ_REPORT_IS_DELETED = 1, /**< Indicates the message is deleted */ - MSG_READ_REPORT_REJECT_BY_USER = 2, /**< Indicates read report reject by user*/ - }; + MSG_READ_REPORT_NONE = -1, /**< Indicates the status unavailable */ + MSG_READ_REPORT_IS_READ = 0, /**< Indicates the message is read */ + MSG_READ_REPORT_IS_DELETED = 1, /**< Indicates the message is deleted */ + MSG_READ_REPORT_REJECT_BY_USER = 2, /**< Indicates read report reject by user*/ +}; /** * @brief Enumeration for the values of a Report Type. \n * This enum is used as the value of msg_read_report_status_t. */ enum _MSG_REPORT_TYPE_E { - MSG_REPORT_TYPE_DELIVERY = 0, /**< Indicates the type is delivery report*/ - MSG_REPORT_TYPE_READ = 1, /**< Indicates the type is read report*/ - MSG_REPORT_TYPE_READ_REPORT_SENT = 2, /**< Indicates the type is read report sent*/ - }; + MSG_REPORT_TYPE_DELIVERY = 0, /**< Indicates the type is delivery report*/ + MSG_REPORT_TYPE_READ = 1, /**< Indicates the type is read report*/ + MSG_REPORT_TYPE_READ_REPORT_SENT = 2, /**< Indicates the type is read report sent*/ +}; /* filter */ /** @@ -1575,7 +1575,7 @@ typedef enum _MimeType { MIME_AUDIO_XMF = 0x201a, /**< Indicates the audio xmf type */ MIME_AUDIO_IMY = 0x201b, /**< Indicates the audio imy type */ MIME_AUDIO_MOBILE_XMF = 0x201c, /**< Indicates the audio mobile xmf type */ - MIME_AUDIO_OGG = 0x201d, /**< Indicates the audio mobile xmf type */ + MIME_AUDIO_OGG = 0x201d, /**< Indicates the audio mobile xmf type */ /* 86 */ MIME_AUDIO_VND_RN_REALAUDIO = 0x2100, /**< Indicates the audio rn real audio type */ @@ -1700,7 +1700,7 @@ typedef enum { MSG_DRM_TYPE_CD = 2, /**< Indicates the combined delivery */ /* 2004-07-09: combined delivery type */ MSG_DRM_TYPE_SD = 3, /**< Indicates the separate delivery */ /* 2004-07-09: seperate delivery type */ MSG_DRM_TYPE_SSD = 4 /**< Indicates the special separate delivery */ /* 2005-02-28: add Special Sperate Delivery */ -}MsgDrmType; +} MsgDrmType; /** * @brief Enumeration for the values of a SMIL region type. @@ -1708,7 +1708,7 @@ typedef enum { typedef enum _REGION_FIT_TYPE_T { MMSUI_IMAGE_REGION_FIT_HIDDEN, /**< Indicates the hidden fit type */ MMSUI_IMAGE_REGION_FIT_MEET, /**< Indicates the meet fit type */ -}REGION_FIT_TYPE_T; +} REGION_FIT_TYPE_T; /** @@ -1723,7 +1723,7 @@ typedef enum { MMS_SMIL_MEDIA_ANIMATE, /**< Indicates the animation media */ MMS_SMIL_MEDIA_IMG_OR_VIDEO , /**< Indicates the image or video media */ MMS_SMIL_MEDIA_MAX = 0xffffffff, /**< Indicates the maximum media type */ -}MmsSmilMediaType; +} MmsSmilMediaType; /** * @brief Enumeration for the values of a SMIL transition type. @@ -1737,11 +1737,11 @@ typedef enum { MMS_SMIL_TRANS_RANDOMBLOCK = 5, /**< Indicates the random block transition */ MMS_SMIL_TRANS_ZOOMIN = 6, /**< Indicates the zoom in transition */ MMS_SMIL_TRANS_IRISWIPE = 7, /**< Indicates the iris wipe transition */ - MMS_SMIL_TRANS_BOXWIPE = 8, /**< Indicates the box wipe transition */ + MMS_SMIL_TRANS_BOXWIPE = 8, /**< Indicates the box wipe transition */ MMS_SMIL_TRANS_FOURBOXWIPE = 9, /**< Indicates the four box wipe transition */ MMS_SMIL_TRANS_PUSHWIPE = 10, /**< Indicates the push wipe transition */ MMS_SMIL_TRANS_ELLIPSEWIPE = 11 /**< Indicates the ellipse wipe transition */ -}MmsSmilTransType; +} MmsSmilTransType; /** * @brief Enumeration for the values of a SMIL transition sub type. @@ -1756,7 +1756,7 @@ typedef enum { MMS_SMIL_TRANS_SUB_HORIZONTAL = 6, /**< Indicates the horizontal transition */ /* barDoorWipe's default */ MMS_SMIL_TRANS_SUB_FROM_RIGHT = 7, /**< Indicates the from right transition */ MMS_SMIL_TRANS_SUB_VERTICAL = 8 /**< Indicates the vertical transition */ -}MmsSmilTransSubType; +} MmsSmilTransSubType; /** * @brief Enumeration for the values of a text font type. @@ -1767,7 +1767,7 @@ typedef enum { MMS_SMIL_FONT_TYPE_ITALIC = 2, /**< Indicates the font type italic */ MMS_SMIL_FONT_TYPE_BOLD = 3, /**< Indicates the font type bold */ MMS_SMIL_FONT_TYPE_UNDERLINE = 4 /**< Indicates the font type underline */ -}MmsSmilFontType; +} MmsSmilFontType; /** * @brief Enumeration for the values of a MMS text direction. diff --git a/include/proxy/MsgHandle.h b/include/proxy/MsgHandle.h index bf6d0c2..816013e 100755 --- a/include/proxy/MsgHandle.h +++ b/include/proxy/MsgHandle.h @@ -22,7 +22,7 @@ #endif /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgStorageTypes.h" #include "MsgTransportTypes.h" @@ -34,142 +34,142 @@ #include "MsgMutex.h" /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class MsgHandle { - public: - MsgHandle(); - virtual ~MsgHandle(); - - /* Control */ - void openHandle(); - void closeHandle(MsgHandle* pHandle); - - /* Transport */ - msg_error_t submitReq(MSG_REQUEST_S* pReq); - - msg_error_t regSentStatusCallback(msg_sent_status_cb onStatusChanged, void *pUserParam); - msg_error_t regSmsMessageCallback(msg_sms_incoming_cb onMsgIncoming, unsigned short port, void *pUserParam); - 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 regReportMessageCallback(msg_report_msg_incoming_cb onReportMsgCB, void *pUserParam); - - msg_error_t operateSyncMLMessage(msg_message_id_t msgId); - - /* Storage */ - int addMessage(MSG_MESSAGE_HIDDEN_S *pMsg, const MSG_SENDINGOPT_S *pSendOpt); - msg_error_t addSyncMLMessage(const MSG_SYNCML_MESSAGE_S *pSyncMLMsg); - msg_error_t updateMessage(const MSG_MESSAGE_HIDDEN_S *pMsg, const MSG_SENDINGOPT_S *pSendOpt); - msg_error_t updateReadStatus(msg_message_id_t MsgId, bool bRead); - msg_error_t setConversationToRead(msg_thread_id_t ThreadId); - msg_error_t updateProtectedStatus(msg_message_id_t MsgId, bool bProtected); - msg_error_t deleteMessage(msg_message_id_t MsgId); - msg_error_t deleteAllMessagesInFolder(msg_folder_id_t FolderId, bool bOnlyDB); - msg_error_t deleteMessagesByList(msg_id_list_s *pMsgIdList); - msg_error_t moveMessageToFolder(msg_message_id_t MsgId, msg_folder_id_t DestFolderId); - msg_error_t moveMessageToStorage(msg_message_id_t MsgId, msg_storage_id_t DestStorageId); - msg_error_t countMessage(msg_folder_id_t FolderId, MSG_COUNT_INFO_S *pCountInfo); - msg_error_t countMsgByType(const MSG_MESSAGE_TYPE_S *pMsgType, int *pMsgCount); - msg_error_t countMsgByContact(const MSG_THREAD_LIST_INDEX_INFO_S *pAddrInfo, MSG_THREAD_COUNT_INFO_S *pMsgThreadCountList); - msg_error_t getMessage(msg_message_id_t MsgId, MSG_MESSAGE_HIDDEN_S *pMsg, MSG_SENDINGOPT_S *pSendOpt); - msg_error_t getConversationViewItem(msg_message_id_t MsgId, MSG_CONVERSATION_VIEW_S *pConv); - msg_error_t addFolder(const MSG_FOLDER_INFO_S *pFolderInfo); - msg_error_t updateFolder(const MSG_FOLDER_INFO_S *pFolderInfo); - msg_error_t deleteFolder(msg_folder_id_t FolderId); - msg_error_t getFolderList(msg_struct_list_s *pFolderList); - - msg_error_t getThreadViewList(const MSG_SORT_RULE_S *pSortRule, msg_struct_list_s *pThreadViewList); - msg_error_t getConversationViewList(msg_thread_id_t ThreadId, msg_struct_list_s *pConvViewList); - msg_error_t deleteThreadMessageList(msg_thread_id_t thread_id, bool include_protected_msg); - msg_error_t getQuickPanelData(msg_quickpanel_type_t Type, MSG_MESSAGE_HIDDEN_S *pMsg); - msg_error_t resetDatabase(); - msg_error_t getMemSize(unsigned int* memsize); - - msg_error_t getAddressList(const msg_thread_id_t threadId, msg_struct_list_s *pAddrList); - - /* Filter */ - msg_error_t addFilter(const MSG_FILTER_S *pFilter); - msg_error_t updateFilter(const MSG_FILTER_S *pFilter); - msg_error_t deleteFilter(msg_filter_id_t FilterId); - msg_error_t getFilterList(msg_struct_list_s *pFilterList); - msg_error_t setFilterOperation(bool bSetFlag); - msg_error_t getFilterOperation(bool *pSetFlag); - msg_error_t setFilterActivation(msg_filter_id_t filter_id, bool active); - - /*setting */ - msg_error_t getSMSCOption(msg_struct_t msg_struct); - msg_error_t setSMSCOption(msg_struct_t msg_struct); - msg_error_t getCBOption(msg_struct_t msg_struct); - msg_error_t setCBOption(msg_struct_t msg_struct); - msg_error_t getSmsSendOpt(msg_struct_t msg_struct); - msg_error_t setSmsSendOpt(msg_struct_t msg_struct); - msg_error_t getMmsSendOpt(msg_struct_t msg_struct); - msg_error_t setMmsSendOpt(msg_struct_t msg_struct); - msg_error_t getMmsRecvOpt(msg_struct_t msg_struct); - msg_error_t setMmsRecvOpt(msg_struct_t msg_struct); - msg_error_t getPushMsgOpt(msg_struct_t msg_struct); - msg_error_t setPushMsgOpt(msg_struct_t msg_struct); - msg_error_t getVoiceMsgOpt(msg_struct_t msg_struct); - msg_error_t setVoiceMsgOpt(msg_struct_t msg_struct); - msg_error_t getGeneralOpt(msg_struct_t msg_struct); - msg_error_t setGeneralOpt(msg_struct_t msg_struct); - msg_error_t getMsgSizeOpt(msg_struct_t msg_struct); - msg_error_t setMsgSizeOpt(msg_struct_t msg_struct); - - /*Backup & Restore */ - msg_error_t backupMessage(msg_message_backup_type_t type, const char *backup_filepath); - msg_error_t restoreMessage(const char *backup_filepath); - msg_error_t getVobject(msg_message_id_t MsgId, void** encodedData); - /* ETC */ - msg_error_t searchMessage(const char *pSearchString, msg_struct_list_s *pThreadViewList); - - - msg_error_t dbSelectWithQuery(const char *query, char ***db_res, int *row_count, int *col_count); - void dbFree(char **db_res); - - msg_error_t getRejectMsgList(const char *pNumber, msg_struct_list_s *pRejectMsgList); - msg_error_t regStorageChangeCallback(msg_storage_change_cb onStorageChange, void *pUserParam); - msg_error_t getReportStatus(msg_message_id_t msg_id, msg_struct_list_s *report_list); - msg_error_t getThreadIdByAddress(msg_struct_list_s *pAddrList, msg_thread_id_t *pThreadId); - msg_error_t getThreadIdByAddress(msg_list_handle_t msg_address_list, msg_thread_id_t *pThreadId); - msg_error_t getThread(msg_thread_id_t threadId, MSG_THREAD_VIEW_S* pThreadInfo); - msg_error_t getMessageList(const MSG_LIST_CONDITION_S *pListCond, msg_struct_list_s *pMsgList); - msg_error_t getMediaList(const msg_thread_id_t thread_id, msg_list_handle_t *pMediaList); - - /* 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); - - void connectSocket(); - void disconnectSocket(); - - private: - void write(const char *pCmd, int CmdSize, char **ppEvent); - void read(char **ppEvent); - void generateConnectionId(char *ConnectionId); - void convertMsgStruct(const MSG_MESSAGE_HIDDEN_S *pSource, MSG_MESSAGE_INFO_S *pDest); - void convertSendOptStruct(const MSG_SENDINGOPT_S* pSrc, MSG_SENDINGOPT_INFO_S* pDest, MSG_MESSAGE_TYPE_S msgType); - int getSettingCmdSize(MSG_OPTION_TYPE_T optionType); - bool checkEventData(char *pEventData); - msg_error_t checkPermission(void); - - char mConnectionId[20]; - short mCounter; - - char mCookie[MAX_COOKIE_LEN]; - - MsgIpcClientSocket mClientSock; - MsgMutex mx; +public: + MsgHandle(); + virtual ~MsgHandle(); + + /* Control */ + void openHandle(); + void closeHandle(MsgHandle* pHandle); + + /* Transport */ + msg_error_t submitReq(MSG_REQUEST_S* pReq); + + msg_error_t regSentStatusCallback(msg_sent_status_cb onStatusChanged, void *pUserParam); + msg_error_t regSmsMessageCallback(msg_sms_incoming_cb onMsgIncoming, unsigned short port, void *pUserParam); + 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 regReportMessageCallback(msg_report_msg_incoming_cb onReportMsgCB, void *pUserParam); + + msg_error_t operateSyncMLMessage(msg_message_id_t msgId); + + /* Storage */ + int addMessage(MSG_MESSAGE_HIDDEN_S *pMsg, const MSG_SENDINGOPT_S *pSendOpt); + msg_error_t addSyncMLMessage(const MSG_SYNCML_MESSAGE_S *pSyncMLMsg); + msg_error_t updateMessage(const MSG_MESSAGE_HIDDEN_S *pMsg, const MSG_SENDINGOPT_S *pSendOpt); + msg_error_t updateReadStatus(msg_message_id_t MsgId, bool bRead); + msg_error_t setConversationToRead(msg_thread_id_t ThreadId); + msg_error_t updateProtectedStatus(msg_message_id_t MsgId, bool bProtected); + msg_error_t deleteMessage(msg_message_id_t MsgId); + msg_error_t deleteAllMessagesInFolder(msg_folder_id_t FolderId, bool bOnlyDB); + msg_error_t deleteMessagesByList(msg_id_list_s *pMsgIdList); + msg_error_t moveMessageToFolder(msg_message_id_t MsgId, msg_folder_id_t DestFolderId); + msg_error_t moveMessageToStorage(msg_message_id_t MsgId, msg_storage_id_t DestStorageId); + msg_error_t countMessage(msg_folder_id_t FolderId, MSG_COUNT_INFO_S *pCountInfo); + msg_error_t countMsgByType(const MSG_MESSAGE_TYPE_S *pMsgType, int *pMsgCount); + msg_error_t countMsgByContact(const MSG_THREAD_LIST_INDEX_INFO_S *pAddrInfo, MSG_THREAD_COUNT_INFO_S *pMsgThreadCountList); + msg_error_t getMessage(msg_message_id_t MsgId, MSG_MESSAGE_HIDDEN_S *pMsg, MSG_SENDINGOPT_S *pSendOpt); + msg_error_t getConversationViewItem(msg_message_id_t MsgId, MSG_CONVERSATION_VIEW_S *pConv); + msg_error_t addFolder(const MSG_FOLDER_INFO_S *pFolderInfo); + msg_error_t updateFolder(const MSG_FOLDER_INFO_S *pFolderInfo); + msg_error_t deleteFolder(msg_folder_id_t FolderId); + msg_error_t getFolderList(msg_struct_list_s *pFolderList); + + msg_error_t getThreadViewList(const MSG_SORT_RULE_S *pSortRule, msg_struct_list_s *pThreadViewList); + msg_error_t getConversationViewList(msg_thread_id_t ThreadId, msg_struct_list_s *pConvViewList); + msg_error_t deleteThreadMessageList(msg_thread_id_t thread_id, bool include_protected_msg); + msg_error_t getQuickPanelData(msg_quickpanel_type_t Type, MSG_MESSAGE_HIDDEN_S *pMsg); + msg_error_t resetDatabase(); + msg_error_t getMemSize(unsigned int* memsize); + + msg_error_t getAddressList(const msg_thread_id_t threadId, msg_struct_list_s *pAddrList); + + /* Filter */ + msg_error_t addFilter(const MSG_FILTER_S *pFilter); + msg_error_t updateFilter(const MSG_FILTER_S *pFilter); + msg_error_t deleteFilter(msg_filter_id_t FilterId); + msg_error_t getFilterList(msg_struct_list_s *pFilterList); + msg_error_t setFilterOperation(bool bSetFlag); + msg_error_t getFilterOperation(bool *pSetFlag); + msg_error_t setFilterActivation(msg_filter_id_t filter_id, bool active); + + /*setting */ + msg_error_t getSMSCOption(msg_struct_t msg_struct); + msg_error_t setSMSCOption(msg_struct_t msg_struct); + msg_error_t getCBOption(msg_struct_t msg_struct); + msg_error_t setCBOption(msg_struct_t msg_struct); + msg_error_t getSmsSendOpt(msg_struct_t msg_struct); + msg_error_t setSmsSendOpt(msg_struct_t msg_struct); + msg_error_t getMmsSendOpt(msg_struct_t msg_struct); + msg_error_t setMmsSendOpt(msg_struct_t msg_struct); + msg_error_t getMmsRecvOpt(msg_struct_t msg_struct); + msg_error_t setMmsRecvOpt(msg_struct_t msg_struct); + msg_error_t getPushMsgOpt(msg_struct_t msg_struct); + msg_error_t setPushMsgOpt(msg_struct_t msg_struct); + msg_error_t getVoiceMsgOpt(msg_struct_t msg_struct); + msg_error_t setVoiceMsgOpt(msg_struct_t msg_struct); + msg_error_t getGeneralOpt(msg_struct_t msg_struct); + msg_error_t setGeneralOpt(msg_struct_t msg_struct); + msg_error_t getMsgSizeOpt(msg_struct_t msg_struct); + msg_error_t setMsgSizeOpt(msg_struct_t msg_struct); + + /*Backup & Restore */ + msg_error_t backupMessage(msg_message_backup_type_t type, const char *backup_filepath); + msg_error_t restoreMessage(const char *backup_filepath); + msg_error_t getVobject(msg_message_id_t MsgId, void** encodedData); + /* ETC */ + msg_error_t searchMessage(const char *pSearchString, msg_struct_list_s *pThreadViewList); + + + msg_error_t dbSelectWithQuery(const char *query, char ***db_res, int *row_count, int *col_count); + void dbFree(char **db_res); + + msg_error_t getRejectMsgList(const char *pNumber, msg_struct_list_s *pRejectMsgList); + msg_error_t regStorageChangeCallback(msg_storage_change_cb onStorageChange, void *pUserParam); + msg_error_t getReportStatus(msg_message_id_t msg_id, msg_struct_list_s *report_list); + msg_error_t getThreadIdByAddress(msg_struct_list_s *pAddrList, msg_thread_id_t *pThreadId); + msg_error_t getThreadIdByAddress(msg_list_handle_t msg_address_list, msg_thread_id_t *pThreadId); + msg_error_t getThread(msg_thread_id_t threadId, MSG_THREAD_VIEW_S* pThreadInfo); + msg_error_t getMessageList(const MSG_LIST_CONDITION_S *pListCond, msg_struct_list_s *pMsgList); + msg_error_t getMediaList(const msg_thread_id_t thread_id, msg_list_handle_t *pMediaList); + + /* 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); + + void connectSocket(); + void disconnectSocket(); + +private: + void write(const char *pCmd, int CmdSize, char **ppEvent); + void read(char **ppEvent); + void generateConnectionId(char *ConnectionId); + void convertMsgStruct(const MSG_MESSAGE_HIDDEN_S *pSource, MSG_MESSAGE_INFO_S *pDest); + void convertSendOptStruct(const MSG_SENDINGOPT_S* pSrc, MSG_SENDINGOPT_INFO_S* pDest, MSG_MESSAGE_TYPE_S msgType); + int getSettingCmdSize(MSG_OPTION_TYPE_T optionType); + bool checkEventData(char *pEventData); + msg_error_t checkPermission(void); + + char mConnectionId[20]; + short mCounter; + + char mCookie[MAX_COOKIE_LEN]; + + MsgIpcClientSocket mClientSock; + MsgMutex mx; }; #endif /* MSG_HANDLE_H */ diff --git a/include/proxy/MsgProxyContact.h b/include/proxy/MsgProxyContact.h index 3d1d0be..abbd660 100644 --- a/include/proxy/MsgProxyContact.h +++ b/include/proxy/MsgProxyContact.h @@ -19,13 +19,13 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgStorageTypes.h" #include "MsgInternalTypes.h" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t MsgOpenContactSvc(); msg_error_t MsgCloseContactSvc(); diff --git a/include/proxy/MsgProxyListener.h b/include/proxy/MsgProxyListener.h index f14a1f8..99f2141 100755 --- a/include/proxy/MsgProxyListener.h +++ b/include/proxy/MsgProxyListener.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgIpcSocket.h" #include "MsgTypes.h" @@ -32,7 +32,7 @@ /*================================================================================================== - VARIABLES + VARIABLES ==================================================================================================*/ typedef struct { MsgHandle* hAddr; @@ -131,7 +131,7 @@ typedef std::list<MSG_REPORT_INCOMING_CB_ITEM_S> MsgReportMessageCBList; typedef std::set<MsgHandle*> handle_set; /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class MsgProxyListener { diff --git a/include/utils/MsgCallStatusManager.h b/include/utils/MsgCallStatusManager.h index 7743bbe..188cfa1 100644 --- a/include/utils/MsgCallStatusManager.h +++ b/include/utils/MsgCallStatusManager.h @@ -18,12 +18,12 @@ #define MSG_CALL_STATUS_MANAGER_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <gio/gio.h> /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define CALL_MGR_BUS_NAME "org.tizen.callmgr" #define CALL_MGR_PATH_NAME "/org/tizen/callmgr" @@ -31,7 +31,7 @@ #define CALL_MGR_MEMBER_NAME "CallStatus" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ void MsgInitCallStatusManager(); void MsgDeInitCallStatusManager(); diff --git a/include/utils/MsgContact.h b/include/utils/MsgContact.h index 3337d31..343d49d 100755 --- a/include/utils/MsgContact.h +++ b/include/utils/MsgContact.h @@ -18,13 +18,13 @@ #define MSG_CONTACT_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgStorageTypes.h" #include "MsgInternalTypes.h" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t MsgGetContactInfo(const MSG_ADDRESS_INFO_S *pAddrInfo, MSG_CONTACT_INFO_S *pContactInfo); diff --git a/include/utils/MsgDebug.h b/include/utils/MsgDebug.h index d1fc5df..146ad39 100755 --- a/include/utils/MsgDebug.h +++ b/include/utils/MsgDebug.h @@ -18,7 +18,7 @@ #define __MSG_DEBUG_H__ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <sys/types.h> #include <unistd.h> @@ -30,7 +30,7 @@ #include "MsgCmdTypes.h" /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define USER_TAG "MSG_FW" #undef LOG_TAG @@ -126,7 +126,7 @@ if (expr) {\ MSG_ERR(fmt, ##__VA_ARGS__);\ return (val);\ - }\ + } \ } while (0) #define MSG_ERR_RET_M(expr, fmt, ...)\ @@ -134,14 +134,14 @@ if (expr) {\ MSG_ERR(fmt, ##__VA_ARGS__);\ return;\ - }\ + } \ } while (0) #define MSG_WARN_M(expr, fmt, ...)\ do { \ if (expr) {\ MSG_WARN(fmt, ##__VA_ARGS__);\ - }\ + } \ } while (0) /*profile log macros*/ @@ -159,7 +159,7 @@ gettimeofday(&__prf_2_##pfid, 0);\ long __ds = __prf_2_##pfid.tv_sec - __prf_1_##pfid.tv_sec;\ long __dm = __prf_2_##pfid.tv_usec - __prf_1_##pfid.tv_usec;\ - if ( __dm < 0 ) { __ds--; __dm = 1000000 + __dm; } \ + if (__dm < 0) { __ds--; __dm = 1000000 + __dm; } \ SLOGD("**PROFILE** [MSGFW: %s: %s() %u ~ %u] " #pfid " -> Elapsed Time: %u.%06u seconds\n", \ rindex(__FILE__, '/')+1, \ __FUNCTION__, \ @@ -185,14 +185,14 @@ int get_tid(); #define MSG_BEGIN() \ do { \ - printf("\n[%d] BEGIN >>>> %s() at [MSGFW: %s: %d]\n", get_tid(), __FUNCTION__, rindex(__FILE__, '/')+1, __LINE__);\ - } while (0) + printf("\n[%d] BEGIN >>>> %s() at [MSGFW: %s: %d]\n", get_tid(), __FUNCTION__, rindex(__FILE__, '/')+1, __LINE__);\ + } while (0) #define MSG_END() \ do { \ - printf("\n[%d] END <<<< %s() at [MSGFW: %s: %d]\n", get_tid(), __FUNCTION__, rindex(__FILE__, '/')+1, __LINE__); \ - } \ - while (0) + printf("\n[%d] END <<<< %s() at [MSGFW: %s: %d]\n", get_tid(), __FUNCTION__, rindex(__FILE__, '/')+1, __LINE__); \ + } \ + while (0) #define MSG_PROFILE_BEGIN(pfid) \ unsigned int __prf_l1_##pfid = __LINE__; \ @@ -208,7 +208,7 @@ int get_tid(); gettimeofday(&__prf_2_##pfid, 0);\ long __ds = __prf_2_##pfid.tv_sec - __prf_1_##pfid.tv_sec;\ long __dm = __prf_2_##pfid.tv_usec - __prf_1_##pfid.tv_usec;\ - if ( __dm < 0 ) { __ds--; __dm = 1000000 + __dm; } \ + if (__dm < 0) { __ds--; __dm = 1000000 + __dm; } \ printf("**PROFILE** [MSGFW: %s: %s() %u ~ %u] " #pfid \ " -> Elapsed Time: %u.%06u seconds\n", \ rindex(__FILE__, '/')+1, \ @@ -240,7 +240,7 @@ int get_tid(); gettimeofday(&__prf_2_##pfid, 0);\ long __ds = __prf_2_##pfid.tv_sec - __prf_1_##pfid.tv_sec;\ long __dm = __prf_2_##pfid.tv_usec - __prf_1_##pfid.tv_usec;\ - if ( __dm < 0 ) { __ds--; __dm = 1000000 + __dm; } \ + if (__dm < 0) { __ds--; __dm = 1000000 + __dm; } \ printf("**PROFILE** [MSGFW: %s: %s() %u ~ %u] " #pfid \ " -> Elapsed Time: %u.%06u seconds\n", \ rindex(__FILE__, '/')+1, \ @@ -258,12 +258,12 @@ int get_tid(); ({\ if (x != NULL) {\ free(x);\ - x = NULL;}\ + x = NULL; } \ }) /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ const char * MsgDbgCmdStr(MSG_CMD_TYPE_T cmdType); diff --git a/include/utils/MsgException.h b/include/utils/MsgException.h index 3d18c59..55874d0 100755 --- a/include/utils/MsgException.h +++ b/include/utils/MsgException.h @@ -18,7 +18,7 @@ #define MSG_EXCEPTION_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <stdexcept> #include <string> @@ -27,7 +27,7 @@ using namespace std; /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define THROW(errCode, debugFmt, ...) \ do {\ @@ -35,22 +35,21 @@ do {\ snprintf(__debugBuf, 256, debugFmt, ##__VA_ARGS__);\ MsgException e(errCode, __debugBuf);\ MSG_FATAL("%s [%d]", e.what(), e.errorCode());\ - throw e; \ + throw e; \ } while (0) /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ -class MsgException : public runtime_error /* public exception */ +class MsgException:public runtime_error /* public exception */ { public: - MsgException(int errCode, const string& msg = "") + MsgException(int errCode, const string &msg = "") : runtime_error(errorStrings[errCode] + " : " + msg), eCode(errCode) { } - enum - { + enum { SUCCESS = 0, INVALID_PARAM, diff --git a/include/utils/MsgGconfWrapper.h b/include/utils/MsgGconfWrapper.h index 95ebb79..6106973 100755 --- a/include/utils/MsgGconfWrapper.h +++ b/include/utils/MsgGconfWrapper.h @@ -19,7 +19,7 @@ /* #define USE_GCONF */ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgInternalTypes.h" @@ -31,34 +31,33 @@ #endif /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ #ifdef USE_GCONF -typedef struct _MSG_GOBJECT_CLIENT_S -{ +typedef struct _MSG_GOBJECT_CLIENT_S { GObject* object; -}MSG_GOBJECT_CLIENT_S; +} MSG_GOBJECT_CLIENT_S; #endif typedef void (*_vconf_change_cb)(keynode_t *key, void* data); /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ -msg_error_t MsgSettingSetString(const char *pKey, const char *pSetValue); -msg_error_t MsgSettingSetInt(const char *pKey, int nSetValue); -msg_error_t MsgSettingSetBool(const char *pKey, bool bSetValue); +msg_error_t MsgSettingSetString(const char *pKey, const char *pSetValue); +msg_error_t MsgSettingSetInt(const char *pKey, int nSetValue); +msg_error_t MsgSettingSetBool(const char *pKey, bool bSetValue); -msg_error_t MsgSettingGetString(const char *pKey, char **pVal); -msg_error_t MsgSettingGetInt(const char *pKey, int *pVal); -msg_error_t MsgSettingGetBool(const char *pKey, bool *pVal); +msg_error_t MsgSettingGetString(const char *pKey, char **pVal); +msg_error_t MsgSettingGetInt(const char *pKey, int *pVal); +msg_error_t MsgSettingGetBool(const char *pKey, bool *pVal); -msg_error_t MsgSettingHandleNewMsg(int SmsCnt, int MmsCnt); -msg_error_t MsgSettingSetIndicator(int SmsCnt, int MmsCnt); +msg_error_t MsgSettingHandleNewMsg(int SmsCnt, int MmsCnt); +msg_error_t MsgSettingSetIndicator(int SmsCnt, int MmsCnt); int MsgSettingGetAutoReject(); -bool MsgSettingGetUnknownAutoReject(); +bool MsgSettingGetUnknownAutoReject(); msg_error_t MsgSettingRegVconfCBCommon(const char *pKey, _vconf_change_cb pCb); msg_error_t MsgSettingRemoveVconfCBCommon(const char *pKey, _vconf_change_cb pCb); diff --git a/include/utils/MsgIpcSocket.h b/include/utils/MsgIpcSocket.h index 9cdecda..f230c08 100755 --- a/include/utils/MsgIpcSocket.h +++ b/include/utils/MsgIpcSocket.h @@ -18,7 +18,7 @@ #define __IPCSocket_H__ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <sys/types.h> #include <map> @@ -28,9 +28,9 @@ /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ -#define MSG_MAX_IPC_SIZE 50000 // 50 * 1000 = sizeof(msg common info) * max message count +#define MSG_MAX_IPC_SIZE 50000 /* 50 * 1000 = sizeof(msg common info) * max message count */ #define MAX_NUM_IPC_CLIENT 10 #define MSG_SOCKET_PATH "/tmp/.msgfw_socket" @@ -40,17 +40,16 @@ /*================================================================================================== - ENUM + ENUM ==================================================================================================*/ -typedef enum -{ +typedef enum { CLOSE_CONNECTION_BY_SIGNAL = 0, CLOSE_CONNECTION_BY_USER = -17, } IPC_CONTROL_E; /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class MsgIpcClientSocket { @@ -58,18 +57,18 @@ public: MsgIpcClientSocket(); /* ~MsgIpcClientSocket(); */ - int maxFd() { return (maxfd+1); } - fd_set fdSet() { return fds; } - int fd() { return sockfd; } + int maxFd() { return (maxfd+1); } + fd_set fdSet() { return fds; } + int fd() { return sockfd; } msg_error_t connect(const char *path); msg_error_t close(); /* write msg to ipc server */ - int write(const char* buf, unsigned int len); + int write(const char* buf, unsigned int len); /* read msg from ipc server */ - int read(char** buf, unsigned int* len); - void addfd(int fd); - int getRemoteFd() {return remotefd; } + int read(char** buf, unsigned int* len); + void addfd(int fd); + int getRemoteFd() {return remotefd; } private: int readn(char *buf, unsigned int len); int writen(const char *buf, unsigned int len); @@ -85,20 +84,20 @@ class MsgIpcServerSocket public: MsgIpcServerSocket(); ~MsgIpcServerSocket() { mapFds.clear(); } - int maxFd() { return (maxfd+1); } - fd_set fdSet() { return fds; } - int fd() { return sockfd; } + int maxFd() { return (maxfd+1); } + fd_set fdSet() { return fds; } + int fd() { return sockfd; } msg_error_t open(const char *path); msg_error_t accept(); - void close(int fd); + void close(int fd); /* read msg from client of fd */ - int read(int fd, char** buf, int* len); + int read(int fd, char** buf, int* len); /* write msg to ipc client */ - int write(int fd, const char* buf, unsigned int len); - void addfd(int fd); - void setSockfd(int fd) { sockfd = fd; } + int write(int fd, const char* buf, unsigned int len); + void addfd(int fd); + void setSockfd(int fd) { sockfd = fd; } private: int readn(int fd, char *buf, unsigned int len); @@ -108,9 +107,9 @@ private: int sockfd; /* information about IPC clients, it is used for select() */ - fd_set fds; - int maxfd; - std::map<int, int> mapFds; + fd_set fds; + int maxfd; + std::map<int, int> mapFds; }; #endif /*__IPCSocket_H__ */ diff --git a/include/utils/MsgJsonParser.h b/include/utils/MsgJsonParser.h index 87034f6..1626800 100755 --- a/include/utils/MsgJsonParser.h +++ b/include/utils/MsgJsonParser.h @@ -21,8 +21,8 @@ #include "MsgDebug.h" typedef enum { - MSG_JSON_GEN_ARRAY, - MSG_JSON_GEN_OBJECT + MSG_JSON_GEN_ARRAY, + MSG_JSON_GEN_OBJECT } msg_json_gen_type; typedef struct msg_json_gen_object_t { @@ -73,7 +73,7 @@ char* msg_json_gen_make_json_msg(msg_json_gen_object *root_obj, unsigned long *l } #define MSG_PRINT_PARSER_OBJECT(index, obj) {\ - switch(obj.type) {\ + switch (obj.type) {\ case MSG_JSON_PARSER_NULL:\ MSG_DEBUG("parse obj : idx = %d, key =[%s], type = [%d], value = [%p], value num = [%f]", index, obj.key, obj.type, obj.value, obj.number_value);\ break;\ @@ -101,42 +101,42 @@ char* msg_json_gen_make_json_msg(msg_json_gen_object *root_obj, unsigned long *l default:\ MSG_DEBUG("parse obj : idx = %d, key =[%s], type = [%d], value = [%p], value num = [%f]", index, obj.key, obj.type, obj.value, obj.number_value);\ break;\ - }\ + } \ } /** *@enum msg_json_parser_value_type * This enumerates json-node types. */ typedef enum { - MSG_JSON_PARSER_NULL = 0, /** 0 <null value */ - MSG_JSON_PARSER_INT, /** 1 < signed integer value */ - MSG_JSON_PARSER_UINT, /** 2 < unsigned integer value */ - MSG_JSON_PARSER_REAL, /** 3 < double value */ - MSG_JSON_PARSER_STRING, /** 4 < UTF-8 string value */ - MSG_JSON_PARSER_BOOLEAN, /** 5 < bool value */ - MSG_JSON_PARSER_ARRAY, /** 6 < array value (ordered list) */ - MSG_JSON_PARSER_OBJECT, /** 7 < object value */ + MSG_JSON_PARSER_NULL = 0, /** 0 <null value */ + MSG_JSON_PARSER_INT, /** 1 < signed integer value */ + MSG_JSON_PARSER_UINT, /** 2 < unsigned integer value */ + MSG_JSON_PARSER_REAL, /** 3 < double value */ + MSG_JSON_PARSER_STRING, /** 4 < UTF-8 string value */ + MSG_JSON_PARSER_BOOLEAN, /** 5 < bool value */ + MSG_JSON_PARSER_ARRAY, /** 6 < array value (ordered list) */ + MSG_JSON_PARSER_OBJECT, /** 7 < object value */ } msg_json_parser_value_type; typedef void *msg_json_parser_handle; typedef struct msg_json_parser_object_t { - msg_json_parser_value_type type; - char *key; - void *value; /** Value of the node. VALID - only if type is - MSG_JSON_PARSER_NULL, - MSG_JSON_PARSER_STRING, - MSG_JSON_PARSER_ARRAY, - MSG_JSON_PARSER_OBJECT */ - double float_value; /** Value of the node. VALID - only if type is - MSG_JSON_PARSER_REAL */ - long long int number_value; /** Value of the node. VALID - only if type is - MSG_JSON_PARSER_UINT, - MSG_JSON_PARSER_INT, - MSG_JSON_PARSER_BOOLEAN */ + msg_json_parser_value_type type; + char *key; + void *value; /** Value of the node. VALID + only if type is + MSG_JSON_PARSER_NULL, + MSG_JSON_PARSER_STRING, + MSG_JSON_PARSER_ARRAY, + MSG_JSON_PARSER_OBJECT */ + double float_value; /** Value of the node. VALID + only if type is + MSG_JSON_PARSER_REAL */ + long long int number_value; /** Value of the node. VALID + only if type is + MSG_JSON_PARSER_UINT, + MSG_JSON_PARSER_INT, + MSG_JSON_PARSER_BOOLEAN */ } msg_json_parser_object; msg_json_parser_handle msg_json_parser_handle_create(void); diff --git a/include/utils/MsgMemory.h b/include/utils/MsgMemory.h index 2be5f89..43082b4 100755 --- a/include/utils/MsgMemory.h +++ b/include/utils/MsgMemory.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <stdio.h> #include <string.h> @@ -27,18 +27,18 @@ /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ -#define GETSP() ({ unsigned int sp; asm volatile ("mov %0,sp " : "=r"(sp) ); sp;}) +#define GETSP() ({ unsigned int sp; asm volatile ("mov %0,sp " : "=r"(sp)); sp; }) #define BUF_SIZE 256 -#define PAGE_SIZE (1 << 12) -#define _ALIGN_UP(addr, size) (((addr)+((size)-1))&(~((size)-1))) -#define _ALIGN_DOWN(addr, size) ((addr)&(~((size)-1))) -#define PAGE_ALIGN(addr) _ALIGN_DOWN(addr, PAGE_SIZE) +#define PAGE_SIZE (1 << 12) +#define _ALIGN_UP(addr, size) (((addr)+((size)-1))&(~((size)-1))) +#define _ALIGN_DOWN(addr, size) ((addr)&(~((size)-1))) +#define PAGE_ALIGN(addr) _ALIGN_DOWN(addr, PAGE_SIZE) /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ static inline void stack_trim(void) @@ -61,9 +61,9 @@ stack_trim(void) } fclose(file); - if(found) { + if (found) { sscanf(buf, "%x-", &stacktop); - if(madvise((void*)PAGE_ALIGN(stacktop), PAGE_ALIGN(sp)-stacktop, MADV_DONTNEED) < 0) + if (madvise((void*)PAGE_ALIGN(stacktop), PAGE_ALIGN(sp)-stacktop, MADV_DONTNEED) < 0) perror("stack madvise fail"); } } diff --git a/include/utils/MsgMmsMessage.h b/include/utils/MsgMmsMessage.h index 805b096..b3d8e67 100755 --- a/include/utils/MsgMmsMessage.h +++ b/include/utils/MsgMmsMessage.h @@ -18,7 +18,7 @@ #define MSG_MMS_MESSAGE_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgTypes.h" #include "MsgInternalTypes.h" diff --git a/include/utils/MsgMutex.h b/include/utils/MsgMutex.h index 89e3c56..39d7525 100755 --- a/include/utils/MsgMutex.h +++ b/include/utils/MsgMutex.h @@ -18,7 +18,7 @@ #define __MSG_MUTEX_H__ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <iostream> #include <pthread.h> @@ -43,7 +43,8 @@ public: ~MsgMutex() { pthread_mutex_destroy(&m); } void lock() { pthread_mutex_lock(&m); } - int timedlock() { + int timedlock() + { struct timespec abs_time; clock_gettime(CLOCK_REALTIME, &abs_time); abs_time.tv_sec += 1; @@ -60,7 +61,7 @@ private: class MsgMutexLocker { public: - MsgMutexLocker(MsgMutex& mx) { + MsgMutexLocker(MsgMutex &mx) { pm = &mx; pm->lock(); } @@ -79,7 +80,8 @@ public: MsgCndVar() { pthread_cond_init(&c, 0); } ~MsgCndVar() { pthread_cond_destroy(&c); } void wait(pthread_mutex_t* m) { pthread_cond_wait(&c, m); } - int timedwait(pthread_mutex_t* m, int sec) { + int timedwait(pthread_mutex_t* m, int sec) + { struct timeval now = {0}; struct timespec timeout = {0}; gettimeofday(&now, NULL); diff --git a/include/utils/MsgSqliteWrapper.h b/include/utils/MsgSqliteWrapper.h index 27a05f2..3fd3dbc 100755 --- a/include/utils/MsgSqliteWrapper.h +++ b/include/utils/MsgSqliteWrapper.h @@ -18,20 +18,20 @@ #define MSG_SQLITE_WRAPPER_H /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgTypes.h" #include "MsgMutex.h" #include <sqlite3.h> /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ -#define MSGFW_DB_NAME TZ_SYS_DB_PATH"/.msg_service.db" +#define MSGFW_DB_NAME TZ_SYS_DB_PATH"/.msg_service.db" #define MSGFW_MESSAGE_TABLE_NAME "MSG_MESSAGE_TABLE" #define MSGFW_FOLDER_TABLE_NAME "MSG_FOLDER_TABLE" -#define MSGFW_ADDRESS_TABLE_NAME "MSG_ADDRESS_TABLE" +#define MSGFW_ADDRESS_TABLE_NAME "MSG_ADDRESS_TABLE" #define MSGFW_CONVERSATION_TABLE_NAME "MSG_CONVERSATION_TABLE" #define MSGFW_SIM_MSG_TABLE_NAME "MSG_SIM_TABLE" #define MSGFW_FILTER_TABLE_NAME "MSG_FILTER_TABLE" @@ -70,17 +70,17 @@ #define MSGFW_DB_ESCAPE_CHAR '\\' -#define SHM_FILE_FOR_DB_LOCK "/.msg_shm_db_lock" +#define SHM_FILE_FOR_DB_LOCK "/.msg_shm_db_lock" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ void MsgReleaseMemoryDB(); msg_error_t MsgConvertStrWithEscape(const char *input, char **output); /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class MsgDbHandler { diff --git a/include/utils/MsgTextConvert.h b/include/utils/MsgTextConvert.h index c9b6087..e67d9a8 100755 --- a/include/utils/MsgTextConvert.h +++ b/include/utils/MsgTextConvert.h @@ -19,13 +19,13 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <map> /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define IN #define OUT @@ -41,10 +41,9 @@ typedef unsigned char MSG_LANGUAGE_ID_T; /*================================================================================================== - ENUMS + ENUMS ==================================================================================================*/ -enum _MSG_CHAR_TYPE_E -{ +enum _MSG_CHAR_TYPE_E { MSG_CHAR_DEFAULT = 0, MSG_CHAR_GSM7EXT, MSG_CHAR_TURKISH, @@ -52,8 +51,7 @@ enum _MSG_CHAR_TYPE_E MSG_CHAR_PORTUGUESE }; -enum _MSG_LANGUAGE_ID_E -{ +enum _MSG_LANGUAGE_ID_E { MSG_LANG_ID_RESERVED = 0, MSG_LANG_ID_TURKISH, MSG_LANG_ID_SPANISH, @@ -71,11 +69,10 @@ enum _MSG_LANGUAGE_ID_E }; /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ -typedef struct _MSG_LANG_INFO_S -{ +typedef struct _MSG_LANG_INFO_S { bool bSingleShift; bool bLockingShift; @@ -84,25 +81,22 @@ typedef struct _MSG_LANG_INFO_S } MSG_LANG_INFO_S; -typedef struct _MSG_SINGLE_SHIFT_S -{ +typedef struct _MSG_SINGLE_SHIFT_S { MSG_LANGUAGE_ID_T langId; } MSG_SINGLE_SHIFT_S; -typedef struct _MSG_LOCKING_SHIFT_S -{ +typedef struct _MSG_LOCKING_SHIFT_S { MSG_LANGUAGE_ID_T langId; } MSG_LOCKING_SHIFT_S; /* ETSI GSM 03.38 GSM 7 bit Default Alphabet Table -> UCS2 */ -static const WCHAR g_GSM7BitToUCS2[] = -{ +static const WCHAR g_GSM7BitToUCS2[] = { /* @ */ 0x0040, 0x00A3, 0x0024, 0x00A5, 0x00E8, 0x00E9, 0x00F9, 0x00EC, 0x00F2, 0x00C7, 0x000A, 0x00D8, 0x00F8, 0x000D, 0x00C5, 0x00E5, /* ��*/ - 0x0394, 0x005F, 0x03A6, 0x0393, 0x039B, 0x03A9, 0x03A0, 0x03A8, 0x03A3, 0x0398, 0x039E, 0x001B, 0x00C6, 0x00E6, 0x00DF, 0x00C9, + 0x0394, 0x005F, 0x03A6, 0x0393, 0x039B, 0x03A9, 0x03A0, 0x03A8, 0x03A3, 0x0398, 0x039E, 0x001B, 0x00C6, 0x00E6, 0x00DF, 0x00C9, /* SP */ 0x0020, 0x0021, 0x0022, 0x0023, 0x00A4, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, /* 0 */ @@ -119,54 +113,53 @@ static const WCHAR g_GSM7BitToUCS2[] = /* GSM 7 bit Default Alphabet Extension Table -> UCS2 */ -static const WCHAR g_GSM7BitExtToUCS2[] = -{ +static const WCHAR g_GSM7BitExtToUCS2[] = { /* 0x0020 -> (SP) for invalid code */ - /* Page Break */ + /* Page Break */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x000C, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - /* ^ */ + /* ^ */ 0x0020, 0x0020, 0x0020, 0x0020, 0x005E, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x001B, 0x0020, 0x0020, 0x0020, 0x0020, - /* { */ /* } */ /* \ */ + /* { */ /* } */ + /* \ */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x007B, 0x007D, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x005C, - /* [ */ /* ~ */ /* ] */ + /* [ */ /* ~ */ /* ] */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x005B, 0x007E, 0x005D, 0x0020, /* | */ 0x007C, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - /* ��*/ + /* ��*/ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x20AC, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020 }; /* Turkish National Language Single Shift Table -> UCS2 */ -static const WCHAR g_TurkishSingleToUCS2[] = -{ +static const WCHAR g_TurkishSingleToUCS2[] = { /* 0x0020 -> (SP) for invalid code */ - /* Page Break */ + /* Page Break */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x000C, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - /* ^ */ + /* ^ */ 0x0020, 0x0020, 0x0020, 0x0020, 0x005E, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x001B, 0x0020, 0x0020, 0x0020, 0x0020, - /* { */ /* } */ /* \ */ + /* { */ /* } */ + /* \ */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x007B, 0x007D, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x005C, - /* [ */ /* ~ */ /* ] */ + /* [ */ /* ~ */ /* ] */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x005B, 0x007E, 0x005D, 0x0020, /* | */ 0x007C, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x011E, 0x0020, 0x0130, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x015E, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - /* ��*/ + /* ��*/ 0x0020, 0x0020, 0x0020, 0x00E7, 0x0020, 0x20AC, 0x0020, 0x011F, 0x0020, 0x0131, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x015F, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020 }; /* Turkish National Language Locking Shift Table -> UCS2 */ -static const WCHAR g_TurkishLockingToUCS2[] = -{ +static const WCHAR g_TurkishLockingToUCS2[] = { /* @ */ 0x0040, 0x00A3, 0x0024, 0x00A5, 0x20AC, 0x00E9, 0x00F9, 0x00EC, 0x00F2, 0x00C7, 0x000A, 0x011E, 0x011F, 0x000D, 0x00C5, 0x00E5, /* ��*/ - 0x0394, 0x005F, 0x03A6, 0x0393, 0x039B, 0x03A9, 0x03A0, 0x03A8, 0x03A3, 0x0398, 0x039E, 0x001B, 0x015E, 0x015F, 0x00DF, 0x00C9, + 0x0394, 0x005F, 0x03A6, 0x0393, 0x039B, 0x03A9, 0x03A0, 0x03A8, 0x03A3, 0x0398, 0x039E, 0x001B, 0x015E, 0x015F, 0x00DF, 0x00C9, /* SP */ 0x0020, 0x0021, 0x0022, 0x0023, 0x00A4, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, /* 0 */ @@ -183,54 +176,53 @@ static const WCHAR g_TurkishLockingToUCS2[] = /* Spanish National Language Single Shift Table -> UCS2 */ -static const WCHAR g_SpanishSingleToUCS2[] = -{ +static const WCHAR g_SpanishSingleToUCS2[] = { /* 0x0020 -> (SP) for invalid code */ - /* Page Break */ + /* Page Break */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00E7, 0x000C, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - /* ^ */ + /* ^ */ 0x0020, 0x0020, 0x0020, 0x0020, 0x005E, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x001B, 0x0020, 0x0020, 0x0020, 0x0020, - /* { */ /* } */ /* \ */ + /* { */ /* } */ + /* \ */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x007B, 0x007D, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x005C, - /* [ */ /* ~ */ /* ] */ + /* [ */ /* ~ */ /* ] */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x005B, 0x007E, 0x005D, 0x0020, /* | */ 0x007C, 0x00C1, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00CD, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00D3, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00DA, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, - /* ��*/ + /* ��*/ 0x0020, 0x00E1, 0x0020, 0x0020, 0x0020, 0x20AC, 0x0020, 0x0020, 0x0020, 0x00ED, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00F3, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00FA, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020 }; /* Portuguese National Language Single Shift Table -> UCS2 */ -static const WCHAR g_PortuSingleToUCS2[] = -{ +static const WCHAR g_PortuSingleToUCS2[] = { /* 0x0020 -> (SP) for invalid code */ - /* Page Break */ + /* Page Break */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00EA, 0x0020, 0x0020, 0x0020, 0x00E7, 0x000C, 0x00D4, 0x00F4, 0x0020, 0x00C1, 0x00E1, - /* ^ */ + /* ^ */ 0x0020, 0x0020, 0x03A6, 0x0393, 0x005E, 0x03A9, 0x03A0, 0x03A8, 0x03A3, 0x0398, 0x0020, 0x001B, 0x0020, 0x0020, 0x0020, 0x00CA, - /* { */ /* } */ /* \ */ + /* { */ /* } */ + /* \ */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x007B, 0x007D, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x005C, - /* [ */ /* ~ */ /* ] */ + /* [ */ /* ~ */ /* ] */ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x005B, 0x007E, 0x005D, 0x0020, /* | */ 0x007C, 0x00C0, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00CD, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00D3, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00DA, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00C3, 0x00D5, 0x0020, 0x0020, 0x0020, - /* ��*/ + /* ��*/ 0x0020, 0x00C2, 0x0020, 0x0020, 0x0020, 0x20AC, 0x0020, 0x0020, 0x0020, 0x00ED, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00F3, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00FA, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x00E3, 0x00F5, 0x0020, 0x0020, 0x00E2 }; /* Portuguese National Language Locking Shift Table -> UCS2 */ -static const WCHAR g_PortuLockingToUCS2[] = -{ +static const WCHAR g_PortuLockingToUCS2[] = { /* @ */ 0x0040, 0x00A3, 0x0024, 0x00A5, 0x00EA, 0x00E9, 0x00FA, 0x00ED, 0x00F3, 0x00E7, 0x000A, 0x00D4, 0x00F4, 0x000D, 0x00C1, 0x00E1, /* ��*/ - 0x0394, 0x005F, 0x0020, 0x00C7, 0x00C0, 0x0020, 0x005E, 0x005C, 0x20AC, 0x00D3, 0x007C, 0x001B, 0x00C2, 0x00E2, 0x00CA, 0x00C9, + 0x0394, 0x005F, 0x0020, 0x00C7, 0x00C0, 0x0020, 0x005E, 0x005C, 0x20AC, 0x00D3, 0x007C, 0x001B, 0x00C2, 0x00E2, 0x00CA, 0x00C9, /* SP */ 0x0020, 0x0021, 0x0022, 0x0023, 0x00A4, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F, /* 0 */ @@ -247,7 +239,7 @@ static const WCHAR g_PortuLockingToUCS2[] = /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class MsgTextConvert { diff --git a/include/utils/MsgUtilFile.h b/include/utils/MsgUtilFile.h index 691546b..dcca088 100755 --- a/include/utils/MsgUtilFile.h +++ b/include/utils/MsgUtilFile.h @@ -19,12 +19,12 @@ #include <stdio.h> /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define FM_READ_WRITE_BUFFER_MAX (1024*1024*3) /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ bool MakeThumbnail(char *srcPath, char *dstPath); /** file operation wrapper - for avoding runtime error */ diff --git a/include/utils/MsgUtilFunction.h b/include/utils/MsgUtilFunction.h index 1442320..f021ced 100755 --- a/include/utils/MsgUtilFunction.h +++ b/include/utils/MsgUtilFunction.h @@ -20,7 +20,7 @@ #define MSG_UTIL_CH_EMAIL_AT '@' /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgStorageTypes.h" #include "MsgSettingTypes.h" @@ -31,18 +31,18 @@ #include <bundle.h> /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define MSG_TYPE_CHECK(a, b) \ do {\ - if(a != (b & 0xff00)) {\ + if (a != (b & 0xff00)) {\ return MSG_ERR_INVALID_PARAMETER; \ } \ - }while(0) + } while (0) /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ bool MsgCheckFeatureSupport(const char *feature_name); diff --git a/include/utils/MsgUtilStorage.h b/include/utils/MsgUtilStorage.h index ffa2f8a..445157e 100755 --- a/include/utils/MsgUtilStorage.h +++ b/include/utils/MsgUtilStorage.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgInternalTypes.h" #include "MsgStorageTypes.h" @@ -27,7 +27,7 @@ #include "MsgSettingTypes.h" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ /* Common Function */ unsigned int MsgStoAddMessageTable(MsgDbHandler *pDbHandle, const MSG_MESSAGE_INFO_S *pMsgInfo); diff --git a/include/utils/MsgVMessage.h b/include/utils/MsgVMessage.h index 92903c8..32f9356 100755 --- a/include/utils/MsgVMessage.h +++ b/include/utils/MsgVMessage.h @@ -19,14 +19,14 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgStorageTypes.h" #include "MsgInternalTypes.h" #include "MsgUtilStorage.h" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ char* MsgVMessageEncode(MSG_MESSAGE_INFO_S *pMsg); char *MsgVMessageEncodeSMS(MSG_MESSAGE_INFO_S *pMsg); diff --git a/manager/inc/msg-manager-contact.h b/manager/inc/msg-manager-contact.h index dc4411c..d53eebb 100644 --- a/manager/inc/msg-manager-contact.h +++ b/manager/inc/msg-manager-contact.h @@ -18,19 +18,19 @@ #define __MSG_MGR_CONTACT_H__ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <msg.h> #include <contacts.h> /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define MAX_CONTACT_TEXT_LEN 100 /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ typedef struct _contactInfo { msg_message_id_t msgId; @@ -42,22 +42,20 @@ typedef struct _contactInfo { msg_list_handle_t addrList; } contactInfo; -typedef struct -{ +typedef struct { msg_contact_id_t contactId; /**< Indicates the unique contact ID. */ int addrbookId; /**< Indicates the address book 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 middleName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the middle name of contact. */ - char prefix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the prefix of contact. */ - char suffix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the suffix of contact. */ - char imagePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the image path of contact. */ + 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 middleName[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the middle name of contact. */ + char prefix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the prefix of contact. */ + char suffix[MAX_DISPLAY_NAME_LEN+1]; /**< Indicates the suffix of contact. */ + char imagePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the image path of contact. */ char alerttonePath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the message alert tone path of contact. */ char vibrationPath[MSG_FILEPATH_LEN_MAX+1]; /**< Indicates the vibration path of contact. */ } MSG_MGR_CONTACT_INFO_S; -typedef struct -{ +typedef struct { msg_address_type_t addressType; /**< The type of an address in case of an Email or a mobile phone */ msg_recipient_type_t recipientType; /**< The type of recipient address in case of To, Cc, and Bcc */ msg_contact_id_t contactId; /**< The contact ID of address */ @@ -66,7 +64,7 @@ typedef struct } MSG_MGR_ADDRESS_INFO_S; /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ int MsgMgrOpenContactSvc(); diff --git a/manager/inc/msg-manager-debug.h b/manager/inc/msg-manager-debug.h index efa321e..967ccee 100755 --- a/manager/inc/msg-manager-debug.h +++ b/manager/inc/msg-manager-debug.h @@ -18,7 +18,7 @@ #define __MSG_MGR_DEBUG_H__ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <sys/types.h> #include <unistd.h> @@ -26,7 +26,7 @@ #include <dlog.h> /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #undef LOG_TAG #define LOG_TAG "MSG_MGR" diff --git a/manager/inc/msg-manager-notification.h b/manager/inc/msg-manager-notification.h index cee77ad..5b17e49 100644 --- a/manager/inc/msg-manager-notification.h +++ b/manager/inc/msg-manager-notification.h @@ -18,21 +18,21 @@ #define __MSG_MGR_NOTIFICATION_H__ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <msg.h> #include <app_control.h> /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ #define MSG_NOTI_INTEGRATION #define MSGFW_MESSAGE_TABLE_NAME "MSG_MESSAGE_TABLE" #define MSGFW_FOLDER_TABLE_NAME "MSG_FOLDER_TABLE" -#define MSGFW_ADDRESS_TABLE_NAME "MSG_ADDRESS_TABLE" +#define MSGFW_ADDRESS_TABLE_NAME "MSG_ADDRESS_TABLE" #define MSGFW_CONVERSATION_TABLE_NAME "MSG_CONVERSATION_TABLE" #define MMS_PLUGIN_MESSAGE_TABLE_NAME "MSG_MMS_MESSAGE_TABLE" #define MSGFW_SMS_REPORT_TABLE_NAME "MSG_SMS_REPORT_TABLE" @@ -117,7 +117,7 @@ #define FAILED_TO_SEND_MESSAGE "IDS_MSG_HEADER_FAILED_TO_SEND_MESSAGE_ABB" #define MESSAGE_SIZE_UNIT_KB "IDS_MSGF_BODY_MSGSIZE_KB" #define MESSAGE_SIZE_STRING "IDS_MSGF_BODY_MESSAGE_SIZE" -#define MSG_SUBJECT_COLON "IDS_MSGF_OPT_SUBJECT_COLON" +#define MSG_SUBJECT_COLON "IDS_MSGF_OPT_SUBJECT_COLON" #else /* system string */ #define NEW_MESSAGE "New message" @@ -157,16 +157,16 @@ #define FAILED_TO_SEND_MESSAGE "Failed to send message." #define MESSAGE_SIZE_UNIT_KB "KB" #define MESSAGE_SIZE_STRING "Message Size" -#define MSG_SUBJECT_COLON "Subject:" +#define MSG_SUBJECT_COLON "Subject:" #endif -#define NOTIFICATION_PRIV_ID "db/private/msg-service/notification_priv_id" -#define VOICE_NOTI_ID_1 "db/private/msg-service/voice_noti_id1" +#define NOTIFICATION_PRIV_ID "db/private/msg-service/notification_priv_id" +#define VOICE_NOTI_ID_1 "db/private/msg-service/voice_noti_id1" #define VOICE_NOTI_ID_2 "db/private/msg-service/voice_noti_id2" -#define CB_NOTI_PRIV_ID "db/private/msg-service/cb_noti_priv_id" -#define SIM_MSG_NOTI_PRIV_ID "db/private/msg-service/sim_msg_noti_priv_id" -#define MSG_SENTFAIL_NOTI_ID "db/private/msg-service/sentfail_noti_id" +#define CB_NOTI_PRIV_ID "db/private/msg-service/cb_noti_priv_id" +#define SIM_MSG_NOTI_PRIV_ID "db/private/msg-service/sim_msg_noti_priv_id" +#define MSG_SENTFAIL_NOTI_ID "db/private/msg-service/sentfail_noti_id" #define SIM_FULL_NOTI_PRIV_ID "db/private/msg-service/sim_full_noti_id" #define MSG_SETTING_NOTIFICATION "db/private/msg-service/general/notification" @@ -198,7 +198,7 @@ typedef unsigned char msg_mgr_active_notification_type_t; /* _msg_active_notific /*================================================================================================== - ENUMS + ENUMS ==================================================================================================*/ enum _msg_mgr_notification_type_e { @@ -230,16 +230,14 @@ enum _msg_mgr_active_notification_type_e { }; -enum _msg_maintype_e -{ +enum _msg_maintype_e { MSG_UNKNOWN_TYPE = 0, /**< Unknown main type */ MSG_SMS_TYPE, /**< SMS */ MSG_MMS_TYPE, /**< MMS */ }; -enum _msg_subtype_e -{ +enum _msg_subtype_e { /* SMS Specific Message Type */ MSG_NORMAL_SMS = 0, /**< Text SMS message */ MSG_CB_SMS, /**< Cell Broadcasting message */ @@ -267,7 +265,7 @@ enum _msg_subtype_e }; /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ typedef struct _msg_mgr_message_info_s { msg_message_id_t msgId; @@ -280,7 +278,7 @@ typedef struct _msg_mgr_message_info_s { } MSG_MGR_MESSAGE_INFO_S; /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ void MsgMgrInitNoti(); diff --git a/manager/inc/msg-manager-sound.h b/manager/inc/msg-manager-sound.h index ec85c4c..15de498 100755 --- a/manager/inc/msg-manager-sound.h +++ b/manager/inc/msg-manager-sound.h @@ -18,24 +18,23 @@ #define __MSG_MGR_SOUND_H__ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ /*================================================================================================== - TYPES + TYPES ==================================================================================================*/ typedef unsigned char MSG_MGR_SOUND_TYPE_T; /*================================================================================================== - ENUMS + ENUMS ==================================================================================================*/ -enum _MSG_MGR_SOUND_TYPE_E -{ +enum _MSG_MGR_SOUND_TYPE_E { MSG_MGR_SOUND_PLAY_DEFAULT = 0, MSG_MGR_SOUND_PLAY_USER, MSG_MGR_SOUND_PLAY_EMERGENCY, @@ -44,13 +43,13 @@ enum _MSG_MGR_SOUND_TYPE_E /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ void initMsgMgrSoundPlayer(); diff --git a/manager/inc/msg-manager-util.h b/manager/inc/msg-manager-util.h index 6479b47..cdca20e 100644 --- a/manager/inc/msg-manager-util.h +++ b/manager/inc/msg-manager-util.h @@ -18,7 +18,7 @@ #define __MSG_MGR_UTIL_H__ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <time.h> @@ -26,13 +26,13 @@ #include <call-manager.h> /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ typedef void (*msg_mgr_alarm_cb)(int alarmId); /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ int MsgMgrAlarmRegistration(struct tm *timeInfo, msg_mgr_alarm_cb userCB, int *alarmId); int MsgMgrAlarmRemove(int alarmId); diff --git a/manager/src/msg-manager-notification.cpp b/manager/src/msg-manager-notification.cpp index 06902a6..3049caf 100644 --- a/manager/src/msg-manager-notification.cpp +++ b/manager/src/msg-manager-notification.cpp @@ -80,16 +80,16 @@ typedef struct _msg_mgr_noti_info_s char sender[MSG_NOTI_TEXT_LEN_S+1]; char text[MSG_NOTI_TEXT_LEN+1]; char number[MSG_NOTI_TEXT_LEN_S+1]; - char imagePath[MAX_IMAGE_PATH_LEN+1]; /**< Indicates the image path of contact. */ + char imagePath[MAX_IMAGE_PATH_LEN+1]; /**< Indicates the image path of contact. */ int applist; app_control_h svc_h; app_control_h active_noti_svc_h[MSG_ACTIVE_NOTI_BUTTON_NUM]; msg_message_id_t msg_id; unsigned char extra_data; - int sim_idx; + int sim_idx; int active_noti_button_num; - int active_media_cnt; - int active_media_size; + int active_media_cnt; + int active_media_size; unsigned char active_subtype; /**< to distinguish cb, push message */ char active_sender[MSG_NOTI_TEXT_LEN_S+1]; char active_subject[MSG_NOTI_TEXT_LEN_S+1]; @@ -100,7 +100,7 @@ typedef struct _msg_mgr_noti_info_s typedef struct _del_noti_info_s { msg_mgr_notification_type_t type; - int sim_idx; + int sim_idx; } DEL_NOTI_INFO_S; @@ -1530,8 +1530,8 @@ int getLatestMsgInfo(MSG_MGR_NOTI_INFO_S *noti_info, bool isForInstantMessage) case MSG_MGR_NOTI_TYPE_CB: case MSG_MGR_NOTI_TYPE_SIM: #endif - { - int smsUnreadCnt = 0; + { + int smsUnreadCnt = 0; int mmsUnreadCnt = 0; char sqlQuery[MAX_QUERY_LEN +1]; @@ -2337,7 +2337,7 @@ void createInfoData(MSG_MGR_NOTI_INFO_S *noti_info, MSG_MGR_MESSAGE_INFO_S *msg_ addServiceExtraData(noti_info->svc_h, "slot_id", slot_id); } - if (voiceNumber) g_free(voiceNumber); + if (voiceNumber) g_free(voiceNumber); if (voiceAlphaId) g_free(voiceAlphaId); break; } diff --git a/manager/src/msg-manager-sound.cpp b/manager/src/msg-manager-sound.cpp index 55d3920..e5b9db4 100644 --- a/manager/src/msg-manager-sound.cpp +++ b/manager/src/msg-manager-sound.cpp @@ -550,7 +550,7 @@ void MsgMgrSoundPlayMelody(char *pMsgToneFilePath) err = player_start(g_PlayerHandle); if (err != PLAYER_ERROR_NONE) { - MSG_MGR_DEBUG("player_start, FAIL [%x]", err); + MSG_MGR_DEBUG("player_start, FAIL [%x]", err); } else { /* Add Timer to stop playing after 5 sec. */ /* diff --git a/mapi/msg_mms.cpp b/mapi/msg_mms.cpp index 0714225..61a40f0 100755 --- a/mapi/msg_mms.cpp +++ b/mapi/msg_mms.cpp @@ -33,11 +33,11 @@ typedef struct { GList *pagelist; GList *regionlist; - GList *attachlist; - GList *transitionlist; - GList *metalist; + GList *attachlist; + GList *transitionlist; + GList *metalist; MMS_SMIL_ROOTLAYOUT rootlayout; - MMS_APPID_INFO_S msgAppId; + MMS_APPID_INFO_S msgAppId; MMS_HEADER_DATA_S header; MMS_MULTIPART_DATA_S smil; GList *multipartlist; /* MMS_MULTIPART_DATA_S */ diff --git a/mapi/msg_setting.cpp b/mapi/msg_setting.cpp index 274196f..dd9075e 100755 --- a/mapi/msg_setting.cpp +++ b/mapi/msg_setting.cpp @@ -23,7 +23,7 @@ #include "msg.h" /******************************************************************************* - * SMSC * + * SMSC * *******************************************************************************/ int msg_setting_get_int_value(msg_struct_s *msg_struct, int field, int *value) diff --git a/plugin/mms_plugin/MmsPluginDecode.cpp b/plugin/mms_plugin/MmsPluginDecode.cpp index db8eccb..0bf2923 100755 --- a/plugin/mms_plugin/MmsPluginDecode.cpp +++ b/plugin/mms_plugin/MmsPluginDecode.cpp @@ -1401,9 +1401,9 @@ __CATCH: /** * Decode Encoded Content type * - * @param pEncodedData [in] ContentType encoded data + * @param pEncodedData [in] ContentType encoded data * @param pMsgType [out] Decoded MsgType - * @return Decoded address list + * @return Decoded address list */ static int __MmsBinaryDecodeContentType(FILE *pFile, MsgType *pMsgType, int totalLength) { @@ -2467,7 +2467,7 @@ __CATCH: /** * Decode uintvar to 32bit unsigned integer * - * @param pEncodedData [in] encoded data + * @param pEncodedData [in] encoded data * @param pUintVar [out] Decode uintvar (32bit unsigned integer) * @return The length of uintvar (-1, if cannot be converted to a uintvar) * @@ -2528,9 +2528,9 @@ __CATCH: /** * Decode uintvar to 32bit unsigned integer by uintvar length * - * @param pEncodedData [in] uintvar encoded data - * @param length [in] length of integer value - * @return unsigned integer value + * @param pEncodedData [in] uintvar encoded data + * @param length [in] length of integer value + * @return unsigned integer value */ static UINT32 __MmsHeaderDecodeIntegerByLength(FILE *pFile, UINT32 length, int totalLength) { @@ -2600,9 +2600,9 @@ __CATCH: /** * Decode uintvar to 32bit unsigned integer by uintvar length * - * @param pEncodedData [in] uintvar encoded data + * @param pEncodedData [in] uintvar encoded data * @param pInteger [out] Decode integer value (long/short) - * @return unsigned integer value (-1, if cannot be converted to unsigned integer value) + * @return unsigned integer value (-1, if cannot be converted to unsigned integer value) */ static bool __MmsBinaryDecodeInteger(FILE *pFile, UINT32 *pInteger, int *pIntLen, int totalLength) { @@ -2684,7 +2684,7 @@ __CATCH: /** * Decode uintvar to 32bit unsigned integer by uintvar length * - * @return 1 : Success + * @return 1 : Success * 0 : This is not Value Length type data * -1 : Requires System error report */ @@ -2740,7 +2740,7 @@ __CATCH: /** * Decode uintvar to 32bit unsigned integer by uintvar length * - * @return 1 : Success + * @return 1 : Success * 0 : This is not Value Length type data * -1 : Requires System error report * @ defference : if there is not length-quote, consider it as short length. @@ -2797,10 +2797,10 @@ __CATCH: /** * Decode QuotedString * - * @param pEncodedData [in] QuotedString encoded data + * @param pEncodedData [in] QuotedString encoded data * @param szBuff [out] Decoded quoted string * @param bufLen [out] Buffer length - * @return length of quoted string + * @return length of quoted string */ static int __MmsBinaryDecodeQuotedString(FILE *pFile, char *szBuff, int bufLen, int totalLength) { @@ -2821,7 +2821,7 @@ static int __MmsBinaryDecodeQuotedString(FILE *pFile, char *szBuff, int bufLen, memset(szBuff, 0, bufLen); if (__MsgLoadDataToDecodeBuffer(pFile, &gpCurMmsDecodeBuff, &gCurMmsDecodeBuffPos, &gMmsDecodeCurOffset, - gpMmsDecodeBuf1, gpMmsDecodeBuf2, gMmsDecodeMaxLen, &gMmsDecodeBufLen, totalLength) == false) { + gpMmsDecodeBuf1, gpMmsDecodeBuf2, gMmsDecodeMaxLen, &gMmsDecodeBufLen, totalLength) == false) { MSG_DEBUG("fail to load to buffer"); goto __CATCH; } @@ -2879,7 +2879,7 @@ static int __MmsBinaryDecodeQuotedString(FILE *pFile, char *szBuff, int bufLen, } if (__MsgLoadDataToDecodeBuffer(pFile, &gpCurMmsDecodeBuff, &gCurMmsDecodeBuffPos, &gMmsDecodeCurOffset, - gpMmsDecodeBuf1, gpMmsDecodeBuf2, gMmsDecodeMaxLen, &gMmsDecodeBufLen, totalLength) == false) { + gpMmsDecodeBuf1, gpMmsDecodeBuf2, gMmsDecodeMaxLen, &gMmsDecodeBufLen, totalLength) == false) { MSG_DEBUG("fail to load to buffer"); goto __CATCH; } @@ -2936,10 +2936,10 @@ __CATCH: /** * Decode Text * - * @param pEncodedData [in] QuotedString encoded data + * @param pEncodedData [in] QuotedString encoded data * @param szBuff [out] Decoded quoted string * @param bufLen [out] Buffer length - * @return length of decode text string + * @return length of decode text string */ static int __MmsBinaryDecodeText(FILE *pFile, char *szBuff, int bufLen, int totalLength) { @@ -2967,7 +2967,7 @@ static int __MmsBinaryDecodeText(FILE *pFile, char *szBuff, int bufLen, int tota memset(szBuff, 0, bufLen); if (__MsgLoadDataToDecodeBuffer(pFile, &gpCurMmsDecodeBuff, &gCurMmsDecodeBuffPos, &gMmsDecodeCurOffset, - gpMmsDecodeBuf1, gpMmsDecodeBuf2, gMmsDecodeMaxLen, &gMmsDecodeBufLen, totalLength) == false) { + gpMmsDecodeBuf1, gpMmsDecodeBuf2, gMmsDecodeMaxLen, &gMmsDecodeBufLen, totalLength) == false) { MSG_DEBUG("fail to load to buffer"); goto __CATCH; } @@ -3271,9 +3271,9 @@ __CATCH: /** * Decode Charset * - * @param pEncodedData [in] QuotedString encoded data + * @param pEncodedData [in] QuotedString encoded data * @param nCharSet [out] Decoded character set - * @return length of charset value + * @return length of charset value */ static bool __MmsBinaryDecodeCharset(FILE *pFile, UINT32 *nCharSet, int *pCharSetLen, int totalLength) { @@ -3318,10 +3318,10 @@ __CATCH: /** * Decode EncodedString * - * @param pEncodedData [in] QuotedString encoded data + * @param pEncodedData [in] QuotedString encoded data * @param szBuff [out] Decoded string buffer * @param bufLen [in] Decoded buffer length - * @return length of decoded string length + * @return length of decoded string length */ static bool __MmsBinaryDecodeEncodedString(FILE *pFile, char *szBuff, int bufLen, int totalLength) { @@ -3443,9 +3443,9 @@ __CATCH: /** * Decode Encoded Addresses * - * @param pEncodedData [in] QuotedString encoded data + * @param pEncodedData [in] QuotedString encoded data * @param pAddrLength [out] Decoded address length - * @return Decoded address list + * @return Decoded address list */ MsgHeaderAddress *__MmsDecodeEncodedAddress(FILE *pFile, int totalLength) { @@ -3539,9 +3539,9 @@ __CATCH: /** * Decode Encoded Pointer String * - * @param pEncodedData [in] Long integer encoded data + * @param pEncodedData [in] Long integer encoded data * @param pLongInteger [out] Decoded long integer - * @return Decoded address list + * @return Decoded address list */ static bool __MmsDecodeLongInteger(FILE *pFile, UINT32 *pLongInteger, int totalLength) { @@ -3813,7 +3813,7 @@ bool MmsReadMsgBody(msg_message_id_t msgID, bool bSavePartsAsTempFiles, bool bRe pMsg->nPartCount++; } - /* make temporary */ + /* make temporary */ snprintf(szTempMediaDir, MSG_FILEPATH_LEN_MAX, "%s%s.dir", MSG_DATA_PATH, pMsg->szFileName); if (MsgIsMultipart(pMsg->msgType.type) == true) { @@ -6120,7 +6120,7 @@ void MmsPluginDecoder::decodeMmsPdu(MmsMsg *pMsg, msg_message_id_t msgID, const pMsg->nPartCount++; } - /* make temporary */ + /* make temporary */ snprintf(szTempMediaDir, MSG_FILEPATH_LEN_MAX, "%s%s.dir", MSG_DATA_PATH, pMsg->szFileName); if (MsgIsMultipart(pMsg->msgType.type) == true) { diff --git a/plugin/mms_plugin/MmsPluginEncode.cpp b/plugin/mms_plugin/MmsPluginEncode.cpp index 1853955..1b535d6 100755 --- a/plugin/mms_plugin/MmsPluginEncode.cpp +++ b/plugin/mms_plugin/MmsPluginEncode.cpp @@ -187,10 +187,10 @@ static void __MmsUnregisterEncodeBuffer2(void) } /** - * @param source [in] originam string + * @param source [in] originam string * @param length [in] gotten from MmsBinaryEncodeTextStringLen() * @param dest [in] buffer to store quted string - * @return changed string length + * @return changed string length */ static bool __MmsBinaryEncodeTextString2(FILE *pFile, UINT8 *source, int length) { @@ -1899,7 +1899,7 @@ static bool __MmsBinaryEncodeMsgPart(FILE *pFile, int contentType, MsgType *pTyp } if (MsgWriteDataFromEncodeBuffer(pFile, gpMmsEncodeBuf, &gCurMmsEncodeBuffPos, - gMmsEncodeMaxLen, &gMmsEncodeCurOffset) == false) { + gMmsEncodeMaxLen, &gMmsEncodeCurOffset) == false) { MSG_DEBUG("2. header MsgWriteDataFromEncodeBuffer fail"); goto __CATCH; } @@ -2300,7 +2300,7 @@ static int __MmsBinaryEncodeIntegerLen(UINT32 integer) /* * This makes value-length by specified integer value * - * @param length [in] gotten from MmsBinaryEncodeIntegerLen() + * @param length [in] gotten from MmsBinaryEncodeIntegerLen() */ static bool __MmsBinaryEncodeInteger(FILE *pFile, UINT32 integer, int length) { @@ -2374,7 +2374,7 @@ static int __MmsBinaryEncodeLongIntegerLen(UINT32 integer) /* * This makes value-length by specified integer value * - * @param length [in] gotten from MmsBinaryEncodeIntegerLen() + * @param length [in] gotten from MmsBinaryEncodeIntegerLen() */ static bool __MmsBinaryEncodeLongInteger(FILE *pFile, UINT32 integer, int length) { @@ -2439,10 +2439,10 @@ static int __MmsBinaryEncodeTextStringLen(UINT8 *source) } /* - * @param source [in] originam string + * @param source [in] originam string * @param length [in] gotten from MmsBinaryEncodeTextStringLen() * @param dest [in] buffer to store quted string - * @return changed string length + * @return changed string length */ static bool __MmsBinaryEncodeTextString(FILE *pFile, UINT8 *source, int length) { @@ -2486,8 +2486,8 @@ __CATCH: /* * Encode 28bit unsigned integer(Maximum) to uintvar * - * @param interger [in] integer to be encoded - * @return encoded UINTVAR stream + * @param interger [in] integer to be encoded + * @return encoded UINTVAR stream */ const UINT32 UINTVAR_LENGTH_1 = 0x0000007f; /* 7bit */ const UINT32 UINTVAR_LENGTH_2 = 0x00003fff; /* 14bit */ @@ -2585,8 +2585,8 @@ static int __MmsBinaryEncodeValueLengthLen(UINT32 integer) /* * This makes value-length by specified integer value * - * @param length [in] from MmsBinaryEncodeValueLengthLen() - * @return encoded value-length + * @param length [in] from MmsBinaryEncodeValueLengthLen() + * @return encoded value-length */ static bool __MmsBinaryEncodeValueLength(FILE *pFile, UINT32 integer, int length) { @@ -2644,10 +2644,10 @@ __CATCH: * make quoted string * Quoted-string = <Octet 34> *TEXT End-of-string * - * @param source [in] original string + * @param source [in] original string * @param length [in] length (in bytes) of data * @param dest [out] buffer to store quted string - * @return changed string length + * @return changed string length */ static bool __MmsBinaryEncodeQuotedString(FILE *pFile, UINT8 *source, int length) { @@ -2711,8 +2711,8 @@ __CATCH: /* * This makes value-length by specified integer value * - * @param length [in] from MmsBinaryEncodeEncodedStringLen() - * @return encoded encoded-string + * @param length [in] from MmsBinaryEncodeEncodedStringLen() + * @return encoded encoded-string */ static bool __MmsBinaryEncodeEncodedString(FILE *pFile, UINT8 *source, int length) { diff --git a/plugin/mms_plugin/MmsPluginHttp.cpp b/plugin/mms_plugin/MmsPluginHttp.cpp index b785403..66d85e1 100755 --- a/plugin/mms_plugin/MmsPluginHttp.cpp +++ b/plugin/mms_plugin/MmsPluginHttp.cpp @@ -642,7 +642,7 @@ MMS_HTTP_ERROR_E MmsPluginHttpAgent::setSession(http_request_info_s &request_inf if (transaction_type == MMS_HTTP_TRANSACTION_TYPE_POST) { curl_easy_setopt(session_option, CURLOPT_POST, true); - curl_easy_setopt(session_option, CURLOPT_POSTFIELDS, request_info.post_data); + curl_easy_setopt(session_option, CURLOPT_POSTFIELDS, request_info.post_data); curl_easy_setopt(session_option, CURLOPT_POSTFIELDSIZE, request_info.post_data_len); /* curl_easy_setopt(session_option, CURLOPT_TCP_NODELAY, 1); */ } diff --git a/plugin/mms_plugin/MmsPluginMain.cpp b/plugin/mms_plugin/MmsPluginMain.cpp index 1081735..f5a1155 100755 --- a/plugin/mms_plugin/MmsPluginMain.cpp +++ b/plugin/mms_plugin/MmsPluginMain.cpp @@ -274,7 +274,7 @@ msg_error_t MmsComposeReadReport(MSG_MESSAGE_INFO_S *pMsgInfo) MSG_BEGIN(); try { - MmsPluginStorage::instance()->composeReadReport(pMsgInfo); + MmsPluginStorage::instance()->composeReadReport(pMsgInfo); } catch (MsgException& e) { MSG_FATAL("%s", e.what()); return MSG_ERR_PLUGIN_STORAGE; diff --git a/plugin/mms_plugin/MmsPluginStorage.cpp b/plugin/mms_plugin/MmsPluginStorage.cpp index 408c8bf..ab8595e 100755 --- a/plugin/mms_plugin/MmsPluginStorage.cpp +++ b/plugin/mms_plugin/MmsPluginStorage.cpp @@ -813,7 +813,7 @@ msg_error_t MmsPluginStorage::insertMultipart(msg_message_id_t msgId, MMS_MULTIP } #if 0 - /* ( MSG_ID INTEGER NOT NULL , SEQ INTEGER DEFAULT 0, CONTENT_TYPE TEXT, NAME TEXT, CHARSET INTEGER, CONTENT_ID TEXT, CONTENT_LOCATION TEXT, FILE_PATH TEXT, TEXT TEXT,); */ + /* ( MSG_ID INTEGER NOT NULL , SEQ INTEGER DEFAULT 0, CONTENT_TYPE TEXT, NAME TEXT, CHARSET INTEGER, CONTENT_ID TEXT, CONTENT_LOCATION TEXT, FILE_PATH TEXT, TEXT TEXT,); */ if (pMultipart->type == MIME_APPLICATION_SMIL) { /* Smil */ snprintf(sqlQuery, sizeof(sqlQuery), "INSERT INTO %s " "(MSG_ID, SEQ, CONTENT_TYPE, NAME, CONTENT_ID, CONTENT_LOCATION, TEXT) " diff --git a/plugin/mms_plugin/include/MmsPluginCodecTypes.h b/plugin/mms_plugin/include/MmsPluginCodecTypes.h index 040cb52..41c7f21 100755 --- a/plugin/mms_plugin/include/MmsPluginCodecTypes.h +++ b/plugin/mms_plugin/include/MmsPluginCodecTypes.h @@ -68,7 +68,7 @@ #define MSG_MMS_CH_ADDR_DELIMETER MSG_CH_ADDR_DELIMETER -typedef unsigned int UINT; +typedef unsigned int UINT; typedef unsigned long int UINT32; typedef unsigned char UINT8; typedef unsigned short int UINT16; diff --git a/plugin/mms_plugin/include/MmsPluginComposer.h b/plugin/mms_plugin/include/MmsPluginComposer.h index e0f304a..4a22126 100755 --- a/plugin/mms_plugin/include/MmsPluginComposer.h +++ b/plugin/mms_plugin/include/MmsPluginComposer.h @@ -28,7 +28,7 @@ public: void composeNotiInd(); void composeDeliveryInd(); void composeReadOriInd(); - void composeRetrieveConf(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S *pSendOptInfo, MMS_DATA_S *pMmsData){}; + void composeRetrieveConf(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S *pSendOptInfo, MMS_DATA_S *pMmsData) {}; void composeSendReq(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_SENDINGOPT_INFO_S *pSendOptInfo, MMS_DATA_S *pMmsData); diff --git a/plugin/mms_plugin/include/MmsPluginConnManWrapper.h b/plugin/mms_plugin/include/MmsPluginConnManWrapper.h index 77f55da..b1a2748 100755 --- a/plugin/mms_plugin/include/MmsPluginConnManWrapper.h +++ b/plugin/mms_plugin/include/MmsPluginConnManWrapper.h @@ -23,7 +23,7 @@ typedef enum { MSG_CM_ERR_NONE = 0, MSG_CM_ERR_UNKNOWN, - } cm_error_e; +} cm_error_e; class MmsPluginCmAgent { public: diff --git a/plugin/mms_plugin/include/MmsPluginHttp.h b/plugin/mms_plugin/include/MmsPluginHttp.h index d7a8f61..0f55870 100755 --- a/plugin/mms_plugin/include/MmsPluginHttp.h +++ b/plugin/mms_plugin/include/MmsPluginHttp.h @@ -72,45 +72,48 @@ typedef struct _http_session_info_s { } http_request_info_s; class MmsPluginHttpAgent { - public: - static MmsPluginHttpAgent *instance(); +public: + static MmsPluginHttpAgent *instance(); - MMS_HTTP_ERROR_E httpRequest(http_request_info_s &request_info); + MMS_HTTP_ERROR_E httpRequest(http_request_info_s &request_info); - void setAbortFlag(){ - MsgMutexLocker locker(mx); - abort = true; - }; + void setAbortFlag() + { + MsgMutexLocker locker(mx); + abort = true; + }; - bool getAbortFlag(){ - MsgMutexLocker locker(mx); - return abort; - }; + bool getAbortFlag() + { + MsgMutexLocker locker(mx); + return abort; + }; - private: - static MmsPluginHttpAgent *pInstance; +private: + static MmsPluginHttpAgent *pInstance; - MmsPluginHttpAgent(); - ~MmsPluginHttpAgent(); + MmsPluginHttpAgent(); + ~MmsPluginHttpAgent(); - void initSession(); - MMS_HTTP_ERROR_E setSession(http_request_info_s &request_info); - MMS_HTTP_ERROR_E startTransaction(); - void clearSession(); + void initSession(); + MMS_HTTP_ERROR_E setSession(http_request_info_s &request_info); + MMS_HTTP_ERROR_E startTransaction(); + void clearSession(); - void initAbortFlag(){ - MsgMutexLocker locker(mx); - abort = false; - }; + void initAbortFlag() + { + MsgMutexLocker locker(mx); + abort = false; + }; - MMS_HTTP_TRANSACTION_TYPE_E transaction_type; + MMS_HTTP_TRANSACTION_TYPE_E transaction_type; - void *session_header; - void *session_option; + void *session_header; + void *session_option; - FILE *respfile; - bool abort; - MsgMutex mx; + FILE *respfile; + bool abort; + MsgMutex mx; }; #endif /* MMS_PLUGIN_HTTP_H */ diff --git a/plugin/mms_plugin/include/MmsPluginInternal.h b/plugin/mms_plugin/include/MmsPluginInternal.h index 8bed1c4..ee2909f 100755 --- a/plugin/mms_plugin/include/MmsPluginInternal.h +++ b/plugin/mms_plugin/include/MmsPluginInternal.h @@ -21,30 +21,30 @@ #include "MmsPluginCodecTypes.h" class MmsPluginInternal { - public: - static MmsPluginInternal *instance(); - - void processReceivedInd(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_REQUEST_INFO_S *pRequest, bool *bReject); - void processSendConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTranQEntity *pRequest); - void processRetrieveConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTranQEntity *pRequest, char *pRetrivedFilePath); - void processForwardConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTranQEntity *pRequest); - bool encodeNotifyRespInd(char *szTrID, msg_delivery_report_status_t iStatus, bool bReportAllowed, char *pSendFilePath); - bool encodeAckInd(char *szTrID, bool bReportAllowed, char *pSendFilePath); - - private: - static MmsPluginInternal *pInstance; - - MmsPluginInternal(); - ~MmsPluginInternal(); - - bool processNotiInd(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_REQUEST_INFO_S *pRequest); - void processDeliveryInd(MSG_MESSAGE_INFO_S *pMsgInfo); - void processReadOrgInd(MSG_MESSAGE_INFO_S *pMsgInfo); - bool checkRejectNotiInd(int roamState, bool bReportAllowed, char *pSendFilePath); - bool checkFilterMmsBody(MMS_DATA_S *pMmsData); - bool getMmsReport(MmsReport mmsReport); - const char *getMmsDeliveryStatus(msg_delivery_report_status_t deliveryStatus); - const char *getMmsReadStatus(msg_read_report_status_t readStatus); +public: + static MmsPluginInternal *instance(); + + void processReceivedInd(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_REQUEST_INFO_S *pRequest, bool *bReject); + void processSendConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTranQEntity *pRequest); + void processRetrieveConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTranQEntity *pRequest, char *pRetrivedFilePath); + void processForwardConf(MSG_MESSAGE_INFO_S *pMsgInfo, mmsTranQEntity *pRequest); + bool encodeNotifyRespInd(char *szTrID, msg_delivery_report_status_t iStatus, bool bReportAllowed, char *pSendFilePath); + bool encodeAckInd(char *szTrID, bool bReportAllowed, char *pSendFilePath); + +private: + static MmsPluginInternal *pInstance; + + MmsPluginInternal(); + ~MmsPluginInternal(); + + bool processNotiInd(MSG_MESSAGE_INFO_S *pMsgInfo, MSG_REQUEST_INFO_S *pRequest); + void processDeliveryInd(MSG_MESSAGE_INFO_S *pMsgInfo); + void processReadOrgInd(MSG_MESSAGE_INFO_S *pMsgInfo); + bool checkRejectNotiInd(int roamState, bool bReportAllowed, char *pSendFilePath); + bool checkFilterMmsBody(MMS_DATA_S *pMmsData); + bool getMmsReport(MmsReport mmsReport); + const char *getMmsDeliveryStatus(msg_delivery_report_status_t deliveryStatus); + const char *getMmsReadStatus(msg_read_report_status_t readStatus); }; #endif /* MMS_PLUGIN_INTERNAL_H */ diff --git a/plugin/mms_plugin/include/MmsPluginTransport.h b/plugin/mms_plugin/include/MmsPluginTransport.h index d3b2f1c..b73287a 100755 --- a/plugin/mms_plugin/include/MmsPluginTransport.h +++ b/plugin/mms_plugin/include/MmsPluginTransport.h @@ -20,17 +20,17 @@ #include "MmsPluginTypes.h" class MmsPluginTransport { - public: - static MmsPluginTransport *instance(); +public: + static MmsPluginTransport *instance(); - void submitRequest(const MSG_REQUEST_INFO_S *pReqInfo); - void cancelRequest(msg_request_id_t reqId); + void submitRequest(const MSG_REQUEST_INFO_S *pReqInfo); + void cancelRequest(msg_request_id_t reqId); - private: - MmsPluginTransport(); - ~MmsPluginTransport(); +private: + MmsPluginTransport(); + ~MmsPluginTransport(); - static MmsPluginTransport *pInstance; + static MmsPluginTransport *pInstance; }; #endif /* MMS_PLUGIN_TRANSPORT_H */ diff --git a/plugin/mms_plugin/include/MmsPluginUserAgent.h b/plugin/mms_plugin/include/MmsPluginUserAgent.h index 4ae9227..cbdb838 100755 --- a/plugin/mms_plugin/include/MmsPluginUserAgent.h +++ b/plugin/mms_plugin/include/MmsPluginUserAgent.h @@ -23,36 +23,36 @@ #include "MmsPluginTypes.h" class MmsPluginUaManager: public MsgThread { - public: - static MmsPluginUaManager *instance(); - virtual void start(); +public: + static MmsPluginUaManager *instance(); + virtual void start(); - void addMmsReqEntity(mmsTranQEntity *req); - void getMmsPduData(mmsTranQEntity *qEntity); - bool processReceivedData(int msgId, char *pRcvdBody, int rcvdBodyLen, char *retrievedFilePath); + void addMmsReqEntity(mmsTranQEntity *req); + void getMmsPduData(mmsTranQEntity *qEntity); + bool processReceivedData(int msgId, char *pRcvdBody, int rcvdBodyLen, char *retrievedFilePath); - void lock() { mx.lock(); } - void unlock() { mx.unlock(); } - void wait() { cv.wait(mx.pMsgMutex()); } - void signal() { cv.signal(); } + void lock() { mx.lock(); } + void unlock() { mx.unlock(); } + void wait() { cv.wait(mx.pMsgMutex()); } + void signal() { cv.signal(); } - private: - MmsPluginUaManager(); - ~MmsPluginUaManager(); +private: + MmsPluginUaManager(); + ~MmsPluginUaManager(); - static MmsPluginUaManager *pInstance; - virtual void run(); + static MmsPluginUaManager *pInstance; + virtual void run(); - MsgMutex mx; - MsgCndVar cv; + MsgMutex mx; + MsgCndVar cv; - MMS_NET_ERROR_T submitHandler(mmsTranQEntity *qEntity); - MMS_NET_ERROR_T waitingConf(mmsTranQEntity *qEntity); + MMS_NET_ERROR_T submitHandler(mmsTranQEntity *qEntity); + MMS_NET_ERROR_T waitingConf(mmsTranQEntity *qEntity); - /* condition values */ - bool running; /* flag for thread running */ + /* condition values */ + bool running; /* flag for thread running */ - MsgSimpleQ<mmsTranQEntity> mmsTranQ; /* transaction q for mms plugin */ + MsgSimpleQ<mmsTranQEntity> mmsTranQ; /* transaction q for mms plugin */ }; #endif /* MMS_PLUGIN_USERAGENT_H */ diff --git a/plugin/sms_cdma_plugin/SmsCdmaPluginCodec.cpp b/plugin/sms_cdma_plugin/SmsCdmaPluginCodec.cpp index 90afbba..b5151ad 100755 --- a/plugin/sms_cdma_plugin/SmsCdmaPluginCodec.cpp +++ b/plugin/sms_cdma_plugin/SmsCdmaPluginCodec.cpp @@ -2078,7 +2078,7 @@ int SmsPluginMsgCodec::encodeUserData(const unsigned char* src, unsigned char *d unsigned char *tmp = (unsigned char *)calloc(1, src_size+1); for (i = 0; i < src_size; i++) { - tmp[i] = src[i] << 1; + tmp[i] = src[i] << 1; } j = 0; diff --git a/plugin/sms_cdma_plugin/SmsCdmaPluginSetting.cpp b/plugin/sms_cdma_plugin/SmsCdmaPluginSetting.cpp index 036c0dd..4bf694e 100755 --- a/plugin/sms_cdma_plugin/SmsCdmaPluginSetting.cpp +++ b/plugin/sms_cdma_plugin/SmsCdmaPluginSetting.cpp @@ -401,7 +401,7 @@ bool SmsPluginSetting::setCbConfig(const MSG_CBMSG_OPT_S *pCbOpt) if (getResultFromSim() == true) { MSG_DEBUG("######## Set Cb Config was Successful !!! #######"); } else { - MSG_DEBUG("######## Set Cb Config was Failed !!! #######"); + MSG_DEBUG("######## Set Cb Config was Failed !!! #######"); return false; } #endif @@ -426,7 +426,7 @@ bool SmsPluginSetting::getCbConfig(MSG_CBMSG_OPT_S *pCbOpt) if (getCbConfigEvent(pCbOpt) == true) { MSG_DEBUG("######## Get Cb Config was Successful !!! #######"); } else { - MSG_DEBUG("######## Get Cb Config was Failed !!! #######"); + MSG_DEBUG("######## Get Cb Config was Failed !!! #######"); return false; } #endif @@ -602,7 +602,7 @@ bool SmsPluginSetting::getMsisdnInfo(void) if (getResultFromSim() == true) { MSG_DEBUG("######## Get Sim msisdn was Successful !!! #######"); } else { - MSG_DEBUG("######## Get Sim msisdn was Failed !!! #######"); + MSG_DEBUG("######## Get Sim msisdn was Failed !!! #######"); return false; } diff --git a/plugin/sms_cdma_plugin/SmsCdmaPluginTransport.cpp b/plugin/sms_cdma_plugin/SmsCdmaPluginTransport.cpp index 6737c31..81aa8f0 100755 --- a/plugin/sms_cdma_plugin/SmsCdmaPluginTransport.cpp +++ b/plugin/sms_cdma_plugin/SmsCdmaPluginTransport.cpp @@ -47,8 +47,8 @@ SmsPluginTransport* SmsPluginTransport::pInstance = NULL; SmsPluginTransport::SmsPluginTransport() { - msgRef = 0x00; - msgRef8bit = 0x00; + msgRef = 0x00; + msgRef8bit = 0x00; msgRef16bit = 0x0000; msgSeqNum = 0x00; diff --git a/plugin/sms_cdma_plugin/SmsCdmaPluginWapPushHandler.cpp b/plugin/sms_cdma_plugin/SmsCdmaPluginWapPushHandler.cpp index c999797..48b3d16 100755 --- a/plugin/sms_cdma_plugin/SmsCdmaPluginWapPushHandler.cpp +++ b/plugin/sms_cdma_plugin/SmsCdmaPluginWapPushHandler.cpp @@ -1393,8 +1393,8 @@ void SmsPluginWapPushHandler::handleSIMessage(char* pPushBody, int PushBodyLen, pushMsg.expires = 0xFFFFFFFF; /* setting received time */ - time_t t = time(NULL); - time_t utfTime = time(&t); + time_t t = time(NULL); + time_t utfTime = time(&t); pushMsg.received = (unsigned long)utfTime; @@ -1545,8 +1545,8 @@ void SmsPluginWapPushHandler::handleSLMessage(char* pPushBody, int PushBodyLen, } /* setting received time setting */ - time_t t = time(NULL); - time_t utfTime = time(&t); + time_t t = time(NULL); + time_t utfTime = time(&t); pushMsg.received = (unsigned long)utfTime; @@ -1905,7 +1905,7 @@ unsigned long SmsPluginWapPushHandler::convertXmlCharToSec(char* pDate) struct tm timeStruct; time_t nTimeInSec = 0; char tmpBuf[10]; - int i = 0, index = 0; + int i = 0, index = 0; memset(tmpBuf, 0x00, sizeof(tmpBuf)); memset(&timeStruct, 0x00, sizeof(struct tm)); diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginCallback.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginCallback.h index 0e3e1f5..52f0468 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginCallback.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginCallback.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <map> #include <vector> @@ -35,7 +35,7 @@ extern "C" } /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ void TapiEventDeviceReady(TapiHandle *handle, const char *noti_id, void *data, void *user_data); @@ -59,7 +59,7 @@ void TapiEventGetMsisdnInfo(TapiHandle *handle, int result, void *data, void *us /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginCallback { diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginCodec.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginCodec.h index d526bab..aa5560d 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginCodec.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginCodec.h @@ -19,13 +19,13 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "SmsCdmaPluginTypes.h" /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginMsgCodec { diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginEventHandler.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginEventHandler.h index 2822883..5eb28cb 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginEventHandler.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginEventHandler.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <string> #include <map> @@ -35,7 +35,7 @@ using namespace std; /*================================================================================================== - VARIABLES AND DEFINES + VARIABLES AND DEFINES ==================================================================================================*/ struct wap_data_s { int length; @@ -61,7 +61,7 @@ typedef struct _sms_wap_info_s { /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginEventHandler { diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginMain.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginMain.h index 4fe2916..6eb4656 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginMain.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginMain.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "SmsCdmaPluginTypes.h" #include "MsgPluginInterface.h" @@ -32,7 +32,7 @@ extern "C" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t SmsPlgInitialize(); diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginSetting.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginSetting.h index 5261057..c728178 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginSetting.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginSetting.h @@ -19,14 +19,14 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMutex.h" #include "MsgSettingTypes.h" /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginSetting { @@ -78,12 +78,12 @@ private: static SmsPluginSetting* pInstance; MSG_SMSC_DATA_S smscData; - MSG_CBMSG_OPT_S cbOpt; + MSG_CBMSG_OPT_S cbOpt; bool bTapiResult; bool bUpdateVoicemailByMdn; - char meImei[MAX_ME_IMEI_LEN + 1]; + char meImei[MAX_ME_IMEI_LEN + 1]; MsgMutex mx; MsgCndVar cv; diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginStorage.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginStorage.h index c42631e..dfc48eb 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginStorage.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginStorage.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMutex.h" @@ -38,7 +38,7 @@ extern "C" } /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginStorage { diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginTransport.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginTransport.h index 005c95d..be50e2b 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginTransport.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginTransport.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgInternalTypes.h" #include "MsgMutex.h" @@ -31,7 +31,7 @@ extern "C" } /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginTransport { @@ -59,12 +59,12 @@ private: void convertMsgInfoToPtp(const MSG_MESSAGE_INFO_S *pMsgInfo, sms_trans_p2p_msg_s *pPtpMsg); void convertMsgInfoToSubmit(const MSG_MESSAGE_INFO_S *pMsgInfo, sms_telesvc_submit_s *pSubmit); - unsigned char msgRef; + unsigned char msgRef; unsigned char msgSeqNum; unsigned char msgSubmitId; - unsigned char msgRef8bit; - unsigned short msgRef16bit; + unsigned char msgRef8bit; + unsigned short msgRef16bit; sms_network_status_t curStatus; diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginTypes.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginTypes.h index 80d764a..b66895c 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginTypes.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginTypes.h @@ -83,7 +83,7 @@ typedef struct _SMS_WSP_METHOD_TYPE_S { typedef struct _SMS_WSP_SECURITY_TYPE_S { char* SecurityTypeName; unsigned char SecurityTypeCode; -}SMS_WSP_SECURITY_TYPE_S; +} SMS_WSP_SECURITY_TYPE_S; typedef struct { @@ -182,16 +182,16 @@ enum _sms_wap_app_code_e { }; -typedef unsigned char sms_network_status_t; /* _sms_network_status_e */ +typedef unsigned char sms_network_status_t; /* _sms_network_status_e */ /********************************************************************************/ -/* TELESERVICE LAYER */ +/* TELESERVICE LAYER */ /********************************************************************************/ -typedef bool sms_digit_mode_t; /* _sms_digit_mode_e */ +typedef bool sms_digit_mode_t; /* _sms_digit_mode_e */ -typedef bool sms_number_mode_t; /* _sms_number_mode_e */ +typedef bool sms_number_mode_t; /* _sms_number_mode_e */ typedef unsigned char sms_number_type_t; /* _sms_number_type_e */ @@ -199,7 +199,7 @@ typedef unsigned char sms_number_plan_t; /* _sms_number_plan_e */ typedef enum _sms_message_type_e { - SMS_TYPE_RESERVED = 0x00, /* reserved */ + SMS_TYPE_RESERVED = 0x00, /* reserved */ SMS_TYPE_DELIVER, /* mobile-terminated only */ SMS_TYPE_SUBMIT, /* mobile-originated only */ SMS_TYPE_CANCEL, /* mobile-originated only */ @@ -209,7 +209,7 @@ typedef enum _sms_message_type_e { SMS_TYPE_DELIVER_REPORT, /* mobile-originated only */ SMS_TYPE_SUBMIT_REPORT = 0x08, /* mobile-terminated only */ SMS_TYPE_MAX_VALUE -}sms_message_type_t; +} sms_message_type_t; typedef enum _sms_alert_option_e { @@ -226,7 +226,7 @@ typedef enum _sms_alert_option_e { SMS_ALERT_HIGH_PRIORITY_ONCE, SMS_ALERT_HIGH_PRIORITY_REPEAT, SMS_ALERT_RESERVED -}sms_alert_option_t; +} sms_alert_option_t; typedef enum _sms_language_type_e { @@ -238,7 +238,7 @@ typedef enum _sms_language_type_e { SMS_LAN_KOREAN, SMS_LAN_CHINESE, SMS_LAN_HEBREW, -}sms_language_type_t; +} sms_language_type_t; typedef enum _sms_priority_indicator_e { @@ -246,7 +246,7 @@ typedef enum _sms_priority_indicator_e { SMS_PRIORITY_INTERACTIVE, SMS_PRIORITY_URGENT, SMS_PRIORITY_EMERGENCY -}sms_priority_indicator_t; +} sms_priority_indicator_t; typedef enum _sms_privacy_indicator_e { @@ -254,7 +254,7 @@ typedef enum _sms_privacy_indicator_e { SMS_PRIVACY_RESTRICTED, SMS_PRIVACY_CONFIDENTIAL, SMS_PRIVACY_SECRET -}sms_privacy_indicator_t; +} sms_privacy_indicator_t; typedef enum _sms_alert_priority_e { @@ -262,7 +262,7 @@ typedef enum _sms_alert_priority_e { SMS_ALERT_LOW_PRIORITY, SMS_ALERT_MEDIUM_PRIORITY, SMS_ALERT_HIGH_PRIORITY -}sms_alert_priority_t; +} sms_alert_priority_t; typedef enum _sms_display_mode_e { @@ -270,7 +270,7 @@ typedef enum _sms_display_mode_e { SMS_DISPLAY_DEFAULT_SETTING, SMS_DISPLAY_USER_INVOKE, SMS_DISPLAY_RESERVED -}sms_display_mode_t; +} sms_display_mode_t; typedef enum _sms_encoding_type_e { @@ -287,7 +287,7 @@ typedef enum _sms_encoding_type_e { SMS_ENCODE_GSMDCS = 0xa, SMS_ENCODE_EUCKR = 0x10, SMS_ENCODE_RESERVED -}sms_encoding_type_t; +} sms_encoding_type_t; typedef enum _sms_relative_time_e { @@ -302,7 +302,7 @@ typedef enum _sms_relative_time_e { SMS_REL_TIME_ACTIVE = 247, SMS_REL_TIME_REGISTRATION = 248, SMS_REL_TIME_RESERVED -}sms_relative_time_t; +} sms_relative_time_t; typedef enum _sms_status_code_e { @@ -327,7 +327,7 @@ typedef enum _sms_status_code_e { SMS_STATUS_PERMANENT_INVALID_DESTINATION = 0xCA, SMS_STATUS_PERMANENT_MESSAGE_EXPIRED = 0xCD, SMS_STATUS_PERMANENT_UNKNOWN_ERROR = 0xDF, -}sms_status_code_t; +} sms_status_code_t; typedef enum _sms_cmae_category_e { @@ -344,7 +344,7 @@ typedef enum _sms_cmae_category_e { SMS_CMAE_CTG_CBRNE = 0x0a, SMS_CMAE_CTG_OTHER = 0x0b, SMS_CMAE_CTG_RESERVED, -}sms_cmae_category_t; +} sms_cmae_category_t; typedef enum _sms_cmae_response_type_e { @@ -357,28 +357,28 @@ typedef enum _sms_cmae_response_type_e { SMS_CMAE_RESP_TYPE_ASSESS = 0x06, SMS_CMAE_RESP_TYPE_NONE = 0x07, SMS_CMAE_RESP_TYPE_RESERVED, -}sms_cmae_response_type_t; +} sms_cmae_response_type_t; typedef enum _sms_cmae_severity_e { SMS_CMAE_SEVERITY_EXTREME = 0x0, SMS_CMAE_SEVERITY_SEVERE = 0x1, SMS_CMAE_SEVERITY_RESERVED, -}sms_cmae_severity_t; +} sms_cmae_severity_t; typedef enum _sms_cmae_urgency_e { SMS_CMAE_URGENCY_IMMEDIATE = 0x0, SMS_CMAE_URGENCY_EXPECTED = 0x1, SMS_CMAE_URGENCY_RESERVED, -}sms_cmae_urgency_t; +} sms_cmae_urgency_t; typedef enum _sms_cmae_certainty_e { SMS_CMAE_CERTAINTY_OBSERVED = 0x0, SMS_CMAE_CERTAINTY_LIKELY = 0x1, SMS_CMAE_CERTAINTY_RESERVED, -}sms_cmae_certainty_t; +} sms_cmae_certainty_t; typedef enum _sms_cmae_alert_handle_e { @@ -387,7 +387,7 @@ typedef enum _sms_cmae_alert_handle_e { SMS_CMAE_ALERT_SEVERE = 0x02, SMS_CMAE_ALERT_AMBER = 0x03, SMS_CMAE_ALERT_RESERVED, -}sms_cmae_alert_handle_t; +} sms_cmae_alert_handle_t; enum _sms_bearer_sub_param_e { @@ -487,9 +487,9 @@ enum _sms_tp_failure_cause_e { typedef struct _sms_trans_msg_id_s { - unsigned short msg_id; + unsigned short msg_id; bool header_ind; -}sms_trans_msg_id_s; +} sms_trans_msg_id_s; typedef struct _sms_telesvc_addr_s { @@ -498,7 +498,7 @@ typedef struct _sms_telesvc_addr_s { sms_number_plan_t number_plan; unsigned int addr_len; char szData[SMS_TRANS_ADDRESS_MAX_LEN + 1]; -}sms_telesvc_addr_s; +} sms_telesvc_addr_s; typedef struct _sms_reply_option_s { @@ -506,12 +506,12 @@ typedef struct _sms_reply_option_s { bool deliver_ack_req; bool read_ack_req; bool report_req; -}sms_reply_option_s; +} sms_reply_option_s; typedef struct _sms_time_relative_s { sms_relative_time_t rel_time; -}sms_time_rel_s; +} sms_time_rel_s; typedef struct _sms_time_stamp_s { unsigned char year; /* range 00-99 (96~99 : 19xx, 00~95 : 20xx) */ @@ -520,23 +520,23 @@ typedef struct _sms_time_stamp_s { unsigned char hours; /* range 0-23 */ unsigned char minutes; /* range 0-59 */ unsigned char seconds; /* range 0-59 */ -}sms_time_abs_s; +} sms_time_abs_s; typedef struct _sms_val_period_s { - unsigned char format; + unsigned char format; union { sms_time_rel_s rel_time; sms_time_abs_s abs_time; - }time; -}sms_val_period_s; + } time; +} sms_val_period_s; typedef struct _sms_encoding_specific_s { sms_encoding_type_t encode_type; unsigned int data_len; - char user_data[SMS_MAX_USER_DATA_LEN +1]; -}sms_encoding_specific_s; + char user_data[SMS_MAX_USER_DATA_LEN +1]; +} sms_encoding_specific_s; typedef struct _sms_ctg_specific_s { @@ -547,14 +547,14 @@ typedef struct _sms_ctg_specific_s { sms_alert_option_t alert_option; unsigned int data_len; char user_data[SMS_MAX_USER_DATA_LEN +1]; -}sms_ctg_specific_s; +} sms_ctg_specific_s; typedef struct _sms_svc_ctg_program_data_s { sms_encoding_type_t encode_type; unsigned int num_data; sms_ctg_specific_s *specific_data; -}sms_svc_ctg_program_data_s; +} sms_svc_ctg_program_data_s; typedef struct _sms_telesvc_userdata_s { @@ -562,7 +562,7 @@ typedef struct _sms_telesvc_userdata_s { unsigned char msg_type; unsigned int data_len; unsigned char user_data[SMS_MAX_USER_DATA_LEN +1]; -}sms_telesvc_userdata_s; +} sms_telesvc_userdata_s; typedef struct _sms_telesvc_cmasdata_s { @@ -578,8 +578,8 @@ typedef struct _sms_telesvc_cmasdata_s { sms_cmae_alert_handle_t alert_handle; /* 00:Presidential 01:Extreme 02:Severe 03:AMBER 04:Test */ sms_time_abs_s expires; sms_language_type_t language; - bool is_wrong_recode_type; -}sms_telesvc_cmasdata_s; + bool is_wrong_recode_type; +} sms_telesvc_cmasdata_s; typedef struct _sms_enhanced_vmn_s { @@ -610,7 +610,7 @@ typedef struct _sms_enhanced_vmn_s { sms_number_plan_t cli_number_plan; unsigned char cli_num_field; unsigned char cli_char[SMS_MAX_USER_DATA_LEN+1]; -}sms_enhanced_vmn_s; +} sms_enhanced_vmn_s; typedef struct _sms_enhanced_vmn_ack_s { @@ -621,7 +621,7 @@ typedef struct _sms_enhanced_vmn_ack_s { unsigned short da_vm_msg_id[SMS_MAX_NUMBER_OF_ACK+1]; unsigned short pa_vm_msg_id[SMS_MAX_NUMBER_OF_ACK+1]; -}sms_enhanced_vmn_ack_s; +} sms_enhanced_vmn_ack_s; typedef struct _sms_telesvc_deliver_s { @@ -644,7 +644,7 @@ typedef struct _sms_telesvc_deliver_s { /* sms_svc_ctg_program_data_s svc_ctg; */ sms_enhanced_vmn_s enhanced_vmn; sms_enhanced_vmn_ack_s enhanced_vmn_ack; -}sms_telesvc_deliver_s; +} sms_telesvc_deliver_s; typedef struct _sms_telesvc_submit_s { @@ -661,12 +661,12 @@ typedef struct _sms_telesvc_submit_s { sms_encoding_specific_s multi_encode_data; unsigned char deposit_id; /* sms_svc_ctg_program_data_s svc_ctg; */ -}sms_telesvc_submit_s; +} sms_telesvc_submit_s; typedef struct _sms_telesvc_cancel_s { sms_trans_msg_id_s msg_id; -}sms_telesvc_cancel_s; +} sms_telesvc_cancel_s; typedef struct _sms_telesvc_user_ack_s { @@ -676,7 +676,7 @@ typedef struct _sms_telesvc_user_ack_s { sms_time_abs_s time_stamp; sms_encoding_specific_s multi_encode_data; unsigned char deposit_id; -}sms_telesvc_user_ack_s; +} sms_telesvc_user_ack_s; typedef struct _sms_telesvc_deliver_ack_s { @@ -685,7 +685,7 @@ typedef struct _sms_telesvc_deliver_ack_s { sms_time_abs_s time_stamp; sms_encoding_specific_s multi_encode_data; sms_status_code_t msg_status; -}sms_telesvc_deliver_ack_s; +} sms_telesvc_deliver_ack_s; typedef struct _sms_telesvc_read_ack_s { @@ -694,7 +694,7 @@ typedef struct _sms_telesvc_read_ack_s { sms_time_abs_s time_stamp; sms_encoding_specific_s multi_encode_data; unsigned char deposit_id; -}sms_telesvc_read_ack_s; +} sms_telesvc_read_ack_s; typedef struct _sms_telesvc_deliver_report_s { sms_trans_msg_id_s msg_id; @@ -702,7 +702,7 @@ typedef struct _sms_telesvc_deliver_report_s { sms_telesvc_userdata_s user_data; sms_language_type_t language; unsigned char multi_encode_data; -}sms_telesvc_report_s; +} sms_telesvc_report_s; typedef struct _sms_telesvc_msg_s { @@ -715,21 +715,21 @@ typedef struct _sms_telesvc_msg_s { sms_telesvc_user_ack_s user_ack; sms_telesvc_deliver_ack_s delivery_ack; sms_telesvc_read_ack_s read_ack; - sms_telesvc_report_s report; - }data; -}sms_telesvc_msg_s; + sms_telesvc_report_s report; + } data; +} sms_telesvc_msg_s; /********************************************************************************/ -/* TRANSPORT LAYER */ +/* TRANSPORT LAYER */ /********************************************************************************/ -typedef unsigned short sms_trans_param_id_t; /* _sms_trans_param_id_e */ +typedef unsigned short sms_trans_param_id_t; /* _sms_trans_param_id_e */ -typedef unsigned short sms_trans_telesvc_id_t; /* _sms_trans_telesvc_id_e */ +typedef unsigned short sms_trans_telesvc_id_t; /* _sms_trans_telesvc_id_e */ -typedef unsigned short sms_trans_svc_ctg_t; /* _sms_trans_svc_ctg_e */ +typedef unsigned short sms_trans_svc_ctg_t; /* _sms_trans_svc_ctg_e */ typedef unsigned char sms_trans_reply_seq_t; @@ -739,7 +739,7 @@ typedef enum _sms_trans_msg_type_e { SMS_TRANS_BROADCAST_MSG = 0x01, SMS_TRANS_ACK_MSG = 0x02, SMS_TRANS_TYPE_RESERVED -}sms_trans_msg_type_t; +} sms_trans_msg_type_t; enum _sms_trans_param_id_e { @@ -823,21 +823,21 @@ typedef enum _sms_trans_err_class_e { SMS_TRANS_ERR_CLASS_NONE = 0x00, SMS_TRANS_ERR_CLASS_TEMPORARY = 0x02, SMS_TRANS_ERR_CLASS_PERMANENT = 0x03 -}sms_trans_err_class_t; +} sms_trans_err_class_t; typedef enum _sms_trans_cause_code_e { SMS_CAUSE_CODE_INVAILD_TELESERVICE_ID = 0x04, SMS_CAUSE_CODE_SERVICE_TERMINATION_DENIED = 0x62, SMS_TODO_FILL_THIS_ENUMS -}sms_trans_cause_code_t; +} sms_trans_cause_code_t; typedef enum _sms_trans_sub_addr_type_e { SMS_TRANS_SUB_ADDR_NSAP = 0x00, SMS_TRANS_SUB_ADDR_USER = 0x01, SMS_TRANS_SUB_ADDR_RESERVED -}sms_trans_sub_addr_type_t; +} sms_trans_sub_addr_type_t; @@ -902,7 +902,7 @@ typedef struct _sms_trans_addr_s { sms_number_plan_t number_plan; unsigned int addr_len; char szData[SMS_TRANS_ADDRESS_MAX_LEN + 1]; -}sms_trans_addr_s; +} sms_trans_addr_s; typedef struct _sms_trans_sub_addr_s { @@ -910,14 +910,14 @@ typedef struct _sms_trans_sub_addr_s { bool odd; unsigned int addr_len; char szData[SMS_TRANS_ADDRESS_MAX_LEN + 1]; -}sms_trans_sub_addr_s; +} sms_trans_sub_addr_s; typedef struct _sms_trans_cause_code_s { sms_trans_reply_seq_t reply_seq; sms_trans_err_class_t error_class; sms_trans_cause_code_t cause_code; -}sms_trans_cause_code_s; +} sms_trans_cause_code_s; typedef struct _sms_trans_p2p_msg_s { @@ -927,20 +927,20 @@ typedef struct _sms_trans_p2p_msg_s { sms_trans_sub_addr_s sub_address; sms_trans_reply_seq_t reply_seq; sms_telesvc_msg_s telesvc_msg; -}sms_trans_p2p_msg_s; +} sms_trans_p2p_msg_s; typedef struct _sms_trans_broadcast_msg_s { sms_trans_svc_ctg_t svc_ctg; sms_telesvc_msg_s telesvc_msg; -}sms_trans_broadcast_msg_s; +} sms_trans_broadcast_msg_s; typedef struct _sms_trans_ack_msg_s { sms_trans_addr_s address; sms_trans_sub_addr_s sub_address; sms_trans_cause_code_s cause_code; -}sms_trans_ack_msg_s; +} sms_trans_ack_msg_s; typedef struct _sms_trans_msg_s { @@ -949,8 +949,8 @@ typedef struct _sms_trans_msg_s { sms_trans_p2p_msg_s p2p_msg; sms_trans_broadcast_msg_s cb_msg; sms_trans_ack_msg_s ack_msg; - }data; -}sms_trans_msg_s; + } data; +} sms_trans_msg_s; #endif /* SMS_CDMA_PLUGIN_TYPES_H */ diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginUAManager.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginUAManager.h index 668df71..7e10580 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginUAManager.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginUAManager.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMutex.h" #include "MsgQueue.h" @@ -28,7 +28,7 @@ /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginUAManager : public MsgThread { @@ -42,10 +42,10 @@ public: private: SmsPluginUAManager(); ~SmsPluginUAManager(); - void lock() { mx.lock(); }; - void unlock() { mx.unlock(); }; - void wait() { cv.wait(mx.pMsgMutex()); }; - void signal() { cv.signal(); }; + void lock() { mx.lock(); }; + void unlock() { mx.unlock(); }; + void wait() { cv.wait(mx.pMsgMutex()); }; + void signal() { cv.signal(); }; virtual void run(); diff --git a/plugin/sms_cdma_plugin/include/SmsCdmaPluginWapPushHandler.h b/plugin/sms_cdma_plugin/include/SmsCdmaPluginWapPushHandler.h index 4f14716..1f48043 100755 --- a/plugin/sms_cdma_plugin/include/SmsCdmaPluginWapPushHandler.h +++ b/plugin/sms_cdma_plugin/include/SmsCdmaPluginWapPushHandler.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <wbxml/wbxml.h> #include <libxml/parser.h> @@ -29,21 +29,21 @@ /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ -#define WSP_STANDARD_STR_LEN_MAX 255 -#define LENGTH_QUOTE 0x1F +#define WSP_STANDARD_STR_LEN_MAX 255 +#define LENGTH_QUOTE 0x1F #define NO_VALUE 0x00 #define WSP_CODE_BUFFER_LEFT_LEN_MAX 1024 #define WSP_CODE_BUFFER_RIGHT_LEN_MAX 2048 -#define AcStrlen(x) ((x == NULL)?0:strlen(x)) +#define AcStrlen(x) ((x == NULL) ? 0 : strlen(x)) #define MIN(a, b) (((a) < (b)) ? (a) : (b)) /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginWapPushHandler { diff --git a/plugin/sms_plugin/SmsPluginParamCodec.cpp b/plugin/sms_plugin/SmsPluginParamCodec.cpp index d605b62..0b952bd 100755 --- a/plugin/sms_plugin/SmsPluginParamCodec.cpp +++ b/plugin/sms_plugin/SmsPluginParamCodec.cpp @@ -284,7 +284,7 @@ int SmsPluginParamCodec::decodeAddress(const unsigned char *pTpdu, SMS_ADDRESS_S convertBcdToDigit(&(pTpdu[offset]), bcdLen, &((pAddress->address)[0])); } - offset += bcdLen; + offset += bcdLen; /* MSG_DEBUG("address [%s]", pAddress->address); */ diff --git a/plugin/sms_plugin/SmsPluginSetting.cpp b/plugin/sms_plugin/SmsPluginSetting.cpp index c1de8a4..b722e7b 100755 --- a/plugin/sms_plugin/SmsPluginSetting.cpp +++ b/plugin/sms_plugin/SmsPluginSetting.cpp @@ -717,7 +717,7 @@ void SmsPluginSetting::getParamList(MSG_SMSC_LIST_S *pSMSCList) MSG_DEBUG("npi[%d]", pSMSCList->smscData[index].smscAddr.npi); MSG_SEC_DEBUG("address[%s]", pSMSCList->smscData[index].smscAddr.address); } else { - MSG_DEBUG("######## Get Parameter was Failed !!! #######"); + MSG_DEBUG("######## Get Parameter was Failed !!! #######"); } } @@ -762,7 +762,7 @@ bool SmsPluginSetting::getParam(TapiHandle *handle, int Index, MSG_SMSC_DATA_S * if (getParamEvent(handle, pSmscData) == true) { MSG_DEBUG("######## Get Parameter was Successful !!! #######"); } else { - MSG_ERR("######## Get Parameter was Failed !!! #######"); + MSG_ERR("######## Get Parameter was Failed !!! #######"); return false; } @@ -933,7 +933,7 @@ bool SmsPluginSetting::setCbConfig(const MSG_CBMSG_OPT_S *pCbOpt) if (getResultFromSim() == true) { MSG_DEBUG("######## Set Cb Config was Successful !!! #######"); } else { - MSG_ERR("######## Set Cb Config was Failed !!! #######"); + MSG_ERR("######## Set Cb Config was Failed !!! #######"); return false; } } @@ -967,7 +967,7 @@ bool SmsPluginSetting::getCbConfig(MSG_CBMSG_OPT_S *pCbOpt) if (getCbConfigEvent(pCbOpt) == true) { MSG_DEBUG("######## Get Cb Config was Successful !!! #######"); } else { - MSG_ERR("######## Get Cb Config was Failed !!! #######"); + MSG_ERR("######## Get Cb Config was Failed !!! #######"); return false; } @@ -1129,7 +1129,7 @@ bool SmsPluginSetting::getVoiceMailInfo(TapiHandle *handle) if (getMailboxInfoEvent() == true) { MSG_DEBUG("######## Get mailbox info was Successful !!! #######"); } else { - MSG_ERR("######## Get mailbox info was Failed !!! #######"); + MSG_ERR("######## Get mailbox info was Failed !!! #######"); return false; } @@ -1296,7 +1296,7 @@ bool SmsPluginSetting::getMwiInfo(TapiHandle *handle) if (getResultFromSim() == true) { MSG_DEBUG("######## Get Mainbox info was Successful !!! #######"); } else { - MSG_DEBUG("######## Get Mainbox info was Failed !!! #######"); + MSG_DEBUG("######## Get Mainbox info was Failed !!! #######"); return false; } @@ -1322,7 +1322,7 @@ bool SmsPluginSetting::getMsisdnInfo(TapiHandle *handle) if (getResultFromSim() == true) { MSG_DEBUG("######## Get Sim msisdn was Successful !!! #######"); } else { - MSG_DEBUG("######## Get Sim msisdn was Failed !!! #######"); + MSG_DEBUG("######## Get Sim msisdn was Failed !!! #######"); return false; } @@ -1348,7 +1348,7 @@ bool SmsPluginSetting::getSimServiceTable(TapiHandle *handle) if (getResultFromSim() == true) { MSG_DEBUG("######## Get SST info was Successful !!! #######"); } else { - MSG_DEBUG("######## Get SST info was Failed !!! #######"); + MSG_DEBUG("######## Get SST info was Failed !!! #######"); return false; } diff --git a/plugin/sms_plugin/SmsPluginSimMsg.cpp b/plugin/sms_plugin/SmsPluginSimMsg.cpp index b234498..730d53f 100755 --- a/plugin/sms_plugin/SmsPluginSimMsg.cpp +++ b/plugin/sms_plugin/SmsPluginSimMsg.cpp @@ -268,7 +268,7 @@ msg_error_t SmsPluginSimMsg::saveSimMessage(const MSG_MESSAGE_INFO_S *pMsgInfo, if (ret == TAPI_API_SUCCESS) { MSG_DEBUG("######## tel_write_sms_in_sim Success !!!#######"); } else { - MSG_DEBUG("######## tel_write_sms_in_sim Fail !!! return : [%d] #######", ret); + MSG_DEBUG("######## tel_write_sms_in_sim Fail !!! return : [%d] #######", ret); return MSG_ERR_PLUGIN_STORAGE; } @@ -298,7 +298,7 @@ msg_error_t SmsPluginSimMsg::saveSimMessage(const MSG_MESSAGE_INFO_S *pMsgInfo, pSimIdList->simId[pSimIdList->count] = SimId; pSimIdList->count++; } else { - MSG_DEBUG("######## Saving Msg was Failed !!! SIM ID : [%d] #######", SimId); + MSG_DEBUG("######## Saving Msg was Failed !!! SIM ID : [%d] #######", SimId); return MSG_ERR_PLUGIN_STORAGE; } @@ -440,7 +440,7 @@ msg_error_t SmsPluginSimMsg::saveClass2Message(const MSG_MESSAGE_INFO_S *pMsgInf if (tapiRet == TAPI_API_SUCCESS) { MSG_DEBUG("######## tel_write_sms_in_sim Success !!!, segNum = [%d] #######", segCnt); } else { - MSG_DEBUG("######## tel_write_sms_in_sim Fail !!! return : [%d] #######", tapiRet); + MSG_DEBUG("######## tel_write_sms_in_sim Fail !!! return : [%d] #######", tapiRet); SmsPluginTransport::instance()->sendDeliverReport(handle, MSG_ERR_STORAGE_ERROR); @@ -467,7 +467,7 @@ void SmsPluginSimMsg::deleteSimMessage(msg_sim_slot_id_t sim_idx, msg_sim_id_t S if (tapiRet == TAPI_API_SUCCESS) MSG_DEBUG("######## tel_delete_sms_in_sim Success !!! #######"); else - THROW(MsgException::SMS_PLG_ERROR, "######## tel_delete_sms_in_sim Fail !!! return : [%d] #######", tapiRet); + THROW(MsgException::SMS_PLG_ERROR, "######## tel_delete_sms_in_sim Fail !!! return : [%d] #######", tapiRet); int SimId = 0; bool bResult = false; @@ -507,7 +507,7 @@ void SmsPluginSimMsg::deleteSimMessage(msg_sim_slot_id_t sim_idx, msg_sim_id_t S if (MsgSettingSetInt(keyName, usedCnt) != MSG_SUCCESS) MSG_DEBUG("Error to set config data [%s]", keyName); } else { - THROW(MsgException::SMS_PLG_ERROR, "######## Deleting Msg was Failed !!! SIM ID : [%d] #######", SimId); + THROW(MsgException::SMS_PLG_ERROR, "######## Deleting Msg was Failed !!! SIM ID : [%d] #######", SimId); } } @@ -560,7 +560,7 @@ void SmsPluginSimMsg::setReadStatus(msg_sim_slot_id_t sim_idx, msg_sim_id_t SimM if (bResult == true) MSG_DEBUG("######## Setting Read Status was Successful !!!, sim id=[%d] #######", SimId); else - THROW(MsgException::SMS_PLG_ERROR, "######## Setting Read Status was Failed !!! #######"); + THROW(MsgException::SMS_PLG_ERROR, "######## Setting Read Status was Failed !!! #######"); } @@ -578,7 +578,7 @@ void SmsPluginSimMsg::getSimMsgCount(TapiHandle *handle, MSG_SIM_COUNT_S *pSimMs if (getSimMsgCntEvent(handle, pSimMsgCnt) == true) MSG_DEBUG("######## Get Sim Msg Count was Successful !!! #######"); else - THROW(MsgException::SMS_PLG_ERROR, "######## Get Sim Msg Count was Failed !!! #######"); + THROW(MsgException::SMS_PLG_ERROR, "######## Get Sim Msg Count was Failed !!! #######"); } @@ -598,7 +598,7 @@ bool SmsPluginSimMsg::getSimMsg(TapiHandle *handle, msg_sim_id_t SimMsgId, MSG_M if (getSimMsgEvent(handle, pMsgInfo) == true) { MSG_DEBUG("######## Get Sim Msg was Successful !!! #######"); } else { - MSG_DEBUG("######## Get Sim Msg was Failed !!! #######"); + MSG_DEBUG("######## Get Sim Msg was Failed !!! #######"); return false; } diff --git a/plugin/sms_plugin/SmsPluginTransport.cpp b/plugin/sms_plugin/SmsPluginTransport.cpp index c0501b7..21af915 100755 --- a/plugin/sms_plugin/SmsPluginTransport.cpp +++ b/plugin/sms_plugin/SmsPluginTransport.cpp @@ -50,8 +50,8 @@ SmsPluginTransport* SmsPluginTransport::pInstance = NULL; SmsPluginTransport::SmsPluginTransport() { - msgRef = 0x00; - msgRef8bit = 0x00; + msgRef = 0x00; + msgRef8bit = 0x00; msgRef16bit = 0x0000; curStatus = 0x00; memset(&curMoCtrlData, 0x00, sizeof(curMoCtrlData)); diff --git a/plugin/sms_plugin/SmsPluginWapPushHandler.cpp b/plugin/sms_plugin/SmsPluginWapPushHandler.cpp index 6f8191a..e76d1f6 100755 --- a/plugin/sms_plugin/SmsPluginWapPushHandler.cpp +++ b/plugin/sms_plugin/SmsPluginWapPushHandler.cpp @@ -2052,7 +2052,7 @@ unsigned long SmsPluginWapPushHandler::convertXmlCharToSec(char* pDate) struct tm timeStruct; time_t nTimeInSec = 0; char tmpBuf[10]; - int i = 0, index = 0; + int i = 0, index = 0; memset(tmpBuf, 0x00, sizeof(tmpBuf)); memset(&timeStruct, 0x00, sizeof(struct tm)); diff --git a/plugin/sms_plugin/include/SmsPluginCallback.h b/plugin/sms_plugin/include/SmsPluginCallback.h index a230c0a..81d3f89 100755 --- a/plugin/sms_plugin/include/SmsPluginCallback.h +++ b/plugin/sms_plugin/include/SmsPluginCallback.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <map> #include <vector> @@ -35,7 +35,7 @@ extern "C" } /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ void TapiEventDeviceReady(TapiHandle *handle, const char *noti_id, void *data, void *user_data); @@ -92,7 +92,7 @@ void TapiEventSimRefreshed(TapiHandle *handle, const char *noti_id, void *data, SMS_NETWORK_STATUS_T convertTapiRespToSmsPlugin(int result); /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginCallback { diff --git a/plugin/sms_plugin/include/SmsPluginCbMsgHandler.h b/plugin/sms_plugin/include/SmsPluginCbMsgHandler.h index 2358217..acc96b7 100755 --- a/plugin/sms_plugin/include/SmsPluginCbMsgHandler.h +++ b/plugin/sms_plugin/include/SmsPluginCbMsgHandler.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <map> #include <vector> @@ -38,13 +38,12 @@ extern "C" /*================================================================================================== - VARIABLES + VARIABLES ==================================================================================================*/ typedef map<unsigned char, SMS_CBMSG_PAGE_S> cbPageMap; -typedef struct _CB_PAGE_INFO_S -{ +typedef struct _CB_PAGE_INFO_S { unsigned char geoScope; unsigned char updateNum; unsigned short msgCode; @@ -58,7 +57,7 @@ typedef struct _CB_PAGE_INFO_S /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginCbMsgHandler { diff --git a/plugin/sms_plugin/include/SmsPluginConcatHandler.h b/plugin/sms_plugin/include/SmsPluginConcatHandler.h index 4ab5533..25c9cd3 100755 --- a/plugin/sms_plugin/include/SmsPluginConcatHandler.h +++ b/plugin/sms_plugin/include/SmsPluginConcatHandler.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <string> #include <map> @@ -32,20 +32,18 @@ using namespace std; /*================================================================================================== - VARIABLES AND DEFINES + VARIABLES AND DEFINES ==================================================================================================*/ #define MAX_CONCAT_LIST 10 -struct CONCAT_DATA_S -{ +struct CONCAT_DATA_S { int length; char data[MAX_USER_DATA_LEN+1]; }; typedef map<unsigned char, CONCAT_DATA_S> concatDataMap; -typedef struct _SMS_CONCAT_MSG_S -{ +typedef struct _SMS_CONCAT_MSG_S { unsigned short msgRef; unsigned char totalSeg; unsigned char seqNum; @@ -55,11 +53,10 @@ typedef struct _SMS_CONCAT_MSG_S SMS_DCS_S dcs; bool bRead; int simId; - int simIndex; + int simIndex; } SMS_CONCAT_MSG_S; -typedef struct _SMS_CONCAT_INFO_S -{ +typedef struct _SMS_CONCAT_INFO_S { unsigned short msgRef; unsigned char totalSeg; unsigned char segCnt; @@ -76,15 +73,14 @@ typedef struct _SMS_CONCAT_INFO_S int simIndex; } SMS_CONCAT_INFO_S; -typedef struct _SMS_SIM_ID_S -{ +typedef struct _SMS_SIM_ID_S { unsigned short msgRef; msg_sim_id_t simId; } SMS_SIM_ID_S; /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginConcatHandler { diff --git a/plugin/sms_plugin/include/SmsPluginDSHandler.h b/plugin/sms_plugin/include/SmsPluginDSHandler.h index 291b8e4..6720e50 100755 --- a/plugin/sms_plugin/include/SmsPluginDSHandler.h +++ b/plugin/sms_plugin/include/SmsPluginDSHandler.h @@ -19,13 +19,13 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "SmsPluginTypes.h" /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginDSHandler { diff --git a/plugin/sms_plugin/include/SmsPluginEventHandler.h b/plugin/sms_plugin/include/SmsPluginEventHandler.h index 78cbd68..035f33a 100755 --- a/plugin/sms_plugin/include/SmsPluginEventHandler.h +++ b/plugin/sms_plugin/include/SmsPluginEventHandler.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMutex.h" #include "MsgTextConvert.h" @@ -28,7 +28,7 @@ /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginEventHandler { diff --git a/plugin/sms_plugin/include/SmsPluginMain.h b/plugin/sms_plugin/include/SmsPluginMain.h index ec9a89d..05a0ced 100755 --- a/plugin/sms_plugin/include/SmsPluginMain.h +++ b/plugin/sms_plugin/include/SmsPluginMain.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "SmsPluginTypes.h" #include "MsgPluginInterface.h" @@ -32,7 +32,7 @@ extern "C" /*================================================================================================== - FUNCTION PROTOTYPES + FUNCTION PROTOTYPES ==================================================================================================*/ msg_error_t SmsPlgInitialize(); diff --git a/plugin/sms_plugin/include/SmsPluginParamCodec.h b/plugin/sms_plugin/include/SmsPluginParamCodec.h index 715a971..3784c70 100755 --- a/plugin/sms_plugin/include/SmsPluginParamCodec.h +++ b/plugin/sms_plugin/include/SmsPluginParamCodec.h @@ -19,13 +19,13 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "SmsPluginTypes.h" /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginParamCodec { diff --git a/plugin/sms_plugin/include/SmsPluginSatHandler.h b/plugin/sms_plugin/include/SmsPluginSatHandler.h index 288e4b5..09afc22 100755 --- a/plugin/sms_plugin/include/SmsPluginSatHandler.h +++ b/plugin/sms_plugin/include/SmsPluginSatHandler.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "SmsPluginTypes.h" #include "MsgMutex.h" @@ -30,7 +30,7 @@ extern "C" } /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginSatHandler { diff --git a/plugin/sms_plugin/include/SmsPluginSetting.h b/plugin/sms_plugin/include/SmsPluginSetting.h index 741add8..0b9093a 100755 --- a/plugin/sms_plugin/include/SmsPluginSetting.h +++ b/plugin/sms_plugin/include/SmsPluginSetting.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMutex.h" #include "MsgSettingTypes.h" @@ -37,7 +37,7 @@ typedef map <int, SMS_SIM_MWI_INFO_S> simMwiInfoMap; typedef map <int, MSG_CBMSG_OPT_S> cbOptMap; /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginSetting { @@ -111,8 +111,8 @@ private: std::list<TapiHandle *> tel_handle_list; /* Setting values for keeping in setting instance */ - smscListMap smscList; - MSG_SIM_STATUS_T simStatus[MAX_TELEPHONY_HANDLE_CNT+1]; + smscListMap smscList; + MSG_SIM_STATUS_T simStatus[MAX_TELEPHONY_HANDLE_CNT+1]; MSG_SMSC_DATA_S smscData[MAX_TELEPHONY_HANDLE_CNT+1]; smsSimMailboxListMap simMailboxList; simMwiInfoMap simMwiInfo; @@ -122,10 +122,10 @@ private: bool bTapiResult; int paramCnt; int selectedParam; - int selectedSimIndex; - char meImei[MAX_ME_IMEI_LEN + 1]; + int selectedSimIndex; + char meImei[MAX_ME_IMEI_LEN + 1]; - bool bMbdnEnable[MAX_TELEPHONY_HANDLE_CNT]; + bool bMbdnEnable[MAX_TELEPHONY_HANDLE_CNT]; MsgMutex mx; MsgCndVar cv; diff --git a/plugin/sms_plugin/include/SmsPluginSimMsg.h b/plugin/sms_plugin/include/SmsPluginSimMsg.h index 2d8c54a..4ea6b5b 100755 --- a/plugin/sms_plugin/include/SmsPluginSimMsg.h +++ b/plugin/sms_plugin/include/SmsPluginSimMsg.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMutex.h" @@ -36,7 +36,7 @@ extern "C" } /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginSimMsg { @@ -82,15 +82,15 @@ private: msg_sim_id_t simMsgId; int delSimMsgId; - int simIdList[MAX_SIM_SMS_NUM]; /** send total simIds to handleSimMsg **/ + int simIdList[MAX_SIM_SMS_NUM]; /** send total simIds to handleSimMsg **/ MSG_SIM_COUNT_S simMsgCnt; MSG_MESSAGE_INFO_S simMsgInfo; MSG_ADDRESS_INFO_S simAddrInfo; - int usedCnt; - int totalCnt; + int usedCnt; + int totalCnt; bool bTapiResult; diff --git a/plugin/sms_plugin/include/SmsPluginStorage.h b/plugin/sms_plugin/include/SmsPluginStorage.h index 5df8f70..d2b5673 100755 --- a/plugin/sms_plugin/include/SmsPluginStorage.h +++ b/plugin/sms_plugin/include/SmsPluginStorage.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMutex.h" @@ -38,7 +38,7 @@ extern "C" } /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginStorage { @@ -85,7 +85,7 @@ private: MSG_ADDRESS_INFO_S addrInfo; std::list<PUSH_APPLICATION_INFO_S> pushAppInfoList; -// unsigned char tmpMsgRef; + /* unsigned char tmpMsgRef; */ }; #endif /* SMS_PLUGIN_STORAGE_H */ diff --git a/plugin/sms_plugin/include/SmsPluginTpduCodec.h b/plugin/sms_plugin/include/SmsPluginTpduCodec.h index f206185..d6ec9b2 100755 --- a/plugin/sms_plugin/include/SmsPluginTpduCodec.h +++ b/plugin/sms_plugin/include/SmsPluginTpduCodec.h @@ -19,13 +19,13 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "SmsPluginTypes.h" /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginTpduCodec { diff --git a/plugin/sms_plugin/include/SmsPluginTransport.h b/plugin/sms_plugin/include/SmsPluginTransport.h index 44f595c..5fea01f 100755 --- a/plugin/sms_plugin/include/SmsPluginTransport.h +++ b/plugin/sms_plugin/include/SmsPluginTransport.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMutex.h" #include "MsgTextConvert.h" @@ -34,7 +34,7 @@ extern "C" } /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginTransport { @@ -72,10 +72,10 @@ private: static SmsPluginTransport* pInstance; - unsigned char msgRef; + unsigned char msgRef; - unsigned char msgRef8bit; - unsigned short msgRef16bit; + unsigned char msgRef8bit; + unsigned short msgRef16bit; SMS_NETWORK_STATUS_T curStatus; TelSatMoSmCtrlIndData_t curMoCtrlData; diff --git a/plugin/sms_plugin/include/SmsPluginTypes.h b/plugin/sms_plugin/include/SmsPluginTypes.h index 646947f..e128e7a 100755 --- a/plugin/sms_plugin/include/SmsPluginTypes.h +++ b/plugin/sms_plugin/include/SmsPluginTypes.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgTextConvert.h" #include "MsgInternalTypes.h" @@ -32,16 +32,16 @@ extern "C" } /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ -#define MAX_ADDRESS_LEN 21 /* including '+' */ -#define MAX_USER_DATA_LEN 160 -#define MAX_GSM_7BIT_DATA_LEN 160 -#define MAX_UCS2_DATA_LEN 140 +#define MAX_ADDRESS_LEN 21 /* including '+' */ +#define MAX_USER_DATA_LEN 160 +#define MAX_GSM_7BIT_DATA_LEN 160 +#define MAX_UCS2_DATA_LEN 140 /* #define MAX_TPDU_DATA_LEN 165 */ #define MAX_TPDU_DATA_LEN 255 #define MAX_SMS_SEND_RETRY 4 -#define MAX_SMSC_LEN 20 +#define MAX_SMSC_LEN 20 #define MAX_ADD_PARAM_LEN 12 #define MAX_DCS_PARAM_LEN 1 #define MAX_ABS_TIME_PARAM_LEN 7 @@ -67,7 +67,7 @@ extern "C" /*================================================================================================== - TYPES + TYPES ==================================================================================================*/ typedef unsigned char SMS_TPDU_TYPE_T; /* _SMS_TPDU_TYPE_E */ @@ -119,7 +119,7 @@ typedef unsigned char SMS_SIM_MAILBOX_TYPE_T; /* _SMS_SIM_MAILBOX_TYPE_E */ typedef unsigned char SMS_NETWORK_STATUS_T; /* _SMS_NETWORK_STATUS_E */ /*================================================================================================== - ENUMS + ENUMS ==================================================================================================*/ enum _SMS_TPDU_TYPE_E { SMS_TPDU_SUBMIT, @@ -399,43 +399,43 @@ enum _SMS_CBMSG_TYPE_E { enum _SMS_CBMSG_LANG_TYPE_E { - SMS_CBMSG_LANG_GERMAN = 0x00, - SMS_CBMSG_LANG_ENGLISH = 0x01, - SMS_CBMSG_LANG_ITALIAN = 0x02, - SMS_CBMSG_LANG_FRENCH = 0x03, - SMS_CBMSG_LANG_SPANISH = 0x04, - SMS_CBMSG_LANG_DUTCH = 0x05, - SMS_CBMSG_LANG_SWEDISH = 0x06, - SMS_CBMSG_LANG_DANISH = 0x07, - SMS_CBMSG_LANG_PORTUGUESE = 0x08, - SMS_CBMSG_LANG_FINNISH = 0x09, - SMS_CBMSG_LANG_NORWEGIAN = 0x0a, - SMS_CBMSG_LANG_GREEK = 0x0b, - SMS_CBMSG_LANG_TURKISH = 0x0c, - SMS_CBMSG_LANG_HUNGARIAN = 0x0d, - SMS_CBMSG_LANG_POLISH = 0x0e, - SMS_CBMSG_LANG_UNSPECIFIED = 0x0f, - - SMS_CBMSG_LANG_ISO639 = 0x10, - - SMS_CBMSG_LANG_CZECH = 0x20, - SMS_CBMSG_LANG_HEBREW = 0x21, - SMS_CBMSG_LANG_ARABIC = 0x22, - SMS_CBMSG_LANG_RUSSIAN = 0x23, - SMS_CBMSG_LANG_ICELANDIC = 0x24, - SMS_CBMSG_LANG_RESERVED_25 = 0x25, + SMS_CBMSG_LANG_GERMAN = 0x00, + SMS_CBMSG_LANG_ENGLISH = 0x01, + SMS_CBMSG_LANG_ITALIAN = 0x02, + SMS_CBMSG_LANG_FRENCH = 0x03, + SMS_CBMSG_LANG_SPANISH = 0x04, + SMS_CBMSG_LANG_DUTCH = 0x05, + SMS_CBMSG_LANG_SWEDISH = 0x06, + SMS_CBMSG_LANG_DANISH = 0x07, + SMS_CBMSG_LANG_PORTUGUESE = 0x08, + SMS_CBMSG_LANG_FINNISH = 0x09, + SMS_CBMSG_LANG_NORWEGIAN = 0x0a, + SMS_CBMSG_LANG_GREEK = 0x0b, + SMS_CBMSG_LANG_TURKISH = 0x0c, + SMS_CBMSG_LANG_HUNGARIAN = 0x0d, + SMS_CBMSG_LANG_POLISH = 0x0e, + SMS_CBMSG_LANG_UNSPECIFIED = 0x0f, + + SMS_CBMSG_LANG_ISO639 = 0x10, + + SMS_CBMSG_LANG_CZECH = 0x20, + SMS_CBMSG_LANG_HEBREW = 0x21, + SMS_CBMSG_LANG_ARABIC = 0x22, + SMS_CBMSG_LANG_RUSSIAN = 0x23, + SMS_CBMSG_LANG_ICELANDIC = 0x24, + SMS_CBMSG_LANG_RESERVED_25 = 0x25, SMS_CBMSG_LANG_RESERVED_26 = 0x26, - SMS_CBMSG_LANG_RESERVED_27 = 0x27, - SMS_CBMSG_LANG_RESERVED_28 = 0x28, - SMS_CBMSG_LANG_RESERVED_29 = 0x29, - SMS_CBMSG_LANG_RESERVED_2A = 0x2a, - SMS_CBMSG_LANG_RESERVED_2B = 0x2b, - SMS_CBMSG_LANG_RESERVED_2C = 0x2c, + SMS_CBMSG_LANG_RESERVED_27 = 0x27, + SMS_CBMSG_LANG_RESERVED_28 = 0x28, + SMS_CBMSG_LANG_RESERVED_29 = 0x29, + SMS_CBMSG_LANG_RESERVED_2A = 0x2a, + SMS_CBMSG_LANG_RESERVED_2B = 0x2b, + SMS_CBMSG_LANG_RESERVED_2C = 0x2c, SMS_CBMSG_LANG_RESERVED_2D = 0x2d, - SMS_CBMSG_LANG_RESERVED_2E = 0x2e, - SMS_CBMSG_LANG_RESERVED_2F = 0x2f, + SMS_CBMSG_LANG_RESERVED_2E = 0x2e, + SMS_CBMSG_LANG_RESERVED_2F = 0x2f, - SMS_CBMSG_LANG_DUMMY = 0xFF + SMS_CBMSG_LANG_DUMMY = 0xFF }; @@ -458,8 +458,8 @@ enum _SMS_SIM_EFILE_NAME_E { SMS_SIM_EFILE_USIM_SMSP = 0x6A42, /** < USIM SMS parameter */ SMS_SIM_EFILE_USIM_SMSS = 0x6A43, /** < USIM SMS status */ SMS_SIM_EFILE_USIM_CBMI = 0x6A45, /** < USIM Cell Broadcast Message Identifier */ - SMS_SIM_EFILE_USIM_MBDN = 0x6FC7, /** < USIM Mail Box Dialing Number */ - SMS_SIM_EFILE_SMS = 0x6F3C, /** < Short Messages file */ + SMS_SIM_EFILE_USIM_MBDN = 0x6FC7, /** < USIM Mail Box Dialing Number */ + SMS_SIM_EFILE_SMS = 0x6F3C, /** < Short Messages file */ SMS_SIM_EFILE_SMSP = 0x6F42, /** < SMS Parameter */ SMS_SIM_EFILE_SMSS = 0x6F43, /** < SMS Status */ SMS_SIM_EFILE_CBMI = 0x6F45, /** < Cell Broadcast Message Identifier */ @@ -493,12 +493,12 @@ enum _SMS_NETWORK_STATUS_E { /*================================================================================================== - STRUCTURES + STRUCTURES ==================================================================================================*/ typedef struct _SMS_ADDRESS_S { - SMS_TON_T ton; - SMS_NPI_T npi; - char address[MAX_ADDRESS_LEN+1]; /* < null terminated string */ + SMS_TON_T ton; + SMS_NPI_T npi; + char address[MAX_ADDRESS_LEN+1]; /* < null terminated string */ } SMS_ADDRESS_S; @@ -533,8 +533,8 @@ typedef struct _SMS_TIMESTAMP_S { SMS_TIME_FORMAT_T format; union { - SMS_TIME_REL_S relative; - SMS_TIME_ABS_S absolute; + SMS_TIME_REL_S relative; + SMS_TIME_ABS_S absolute; } time; } SMS_TIMESTAMP_S; @@ -580,7 +580,7 @@ typedef struct _SMS_UDH_S { SMS_CONCAT_16BIT_S concat16bit; SMS_APP_PORT_8BIT_S appPort8bit; SMS_APP_PORT_16BIT_S appPort16bit; - SMS_SPECIAL_INDICATION_S specialInd; + SMS_SPECIAL_INDICATION_S specialInd; MSG_SINGLE_SHIFT_S singleShift; MSG_LOCKING_SHIFT_S lockingShift; SMS_ADDRESS_S alternateAddress; @@ -591,14 +591,14 @@ typedef struct _SMS_UDH_S { typedef struct _SMS_USERDATA_S { int headerCnt; SMS_UDH_S header[MAX_UD_HEADER_NUM]; - int length; - char data[MAX_USER_DATA_LEN+1]; + int length; + char data[MAX_USER_DATA_LEN+1]; } SMS_USERDATA_S; typedef struct _SMS_TPUD_S { int udl; - char ud[MAX_USER_DATA_LEN+1]; + char ud[MAX_USER_DATA_LEN+1]; } SMS_TPUD_S; @@ -607,7 +607,7 @@ typedef struct _SMS_SUBMIT_S { bool bStatusReport; bool bHeaderInd; bool bReplyPath; - unsigned char msgRef; + unsigned char msgRef; SMS_VPF_T vpf; SMS_ADDRESS_S destAddress; SMS_PID_T pid; @@ -617,8 +617,7 @@ typedef struct _SMS_SUBMIT_S { } SMS_SUBMIT_S; -typedef struct _SMS_SUBMIT_DATA_S -{ +typedef struct _SMS_SUBMIT_DATA_S { SMS_ADDRESS_S destAddress; unsigned int segCount; SMS_USERDATA_S userData[MAX_SEGMENT_NUM]; @@ -631,7 +630,7 @@ typedef struct _SMS_DELIVER_S { bool bHeaderInd; bool bReplyPath; SMS_ADDRESS_S originAddress; - SMS_PID_T pid; + SMS_PID_T pid; SMS_DCS_S dcs; SMS_TIMESTAMP_S timeStamp; SMS_USERDATA_S userData; @@ -643,8 +642,8 @@ typedef struct _SMS_DELIVER_REPORT_S { SMS_REPORT_TYPE_T reportType; bool bHeaderInd; SMS_FAIL_CAUSE_T failCause; - unsigned char paramInd; - SMS_PID_T pid; + unsigned char paramInd; + SMS_PID_T pid; SMS_DCS_S dcs; SMS_USERDATA_S userData; } SMS_DELIVER_REPORT_S; @@ -654,13 +653,13 @@ typedef struct _SMS_STATUS_REPORT_S { bool bMoreMsg; bool bStatusReport; bool bHeaderInd; - unsigned char msgRef; + unsigned char msgRef; SMS_ADDRESS_S recipAddress; SMS_TIMESTAMP_S timeStamp; SMS_TIMESTAMP_S dischargeTime; SMS_STATUS_T status; - unsigned char paramInd; - SMS_PID_T pid; + unsigned char paramInd; + SMS_PID_T pid; SMS_DCS_S dcs; SMS_USERDATA_S userData; } SMS_STATUS_REPORT_S; @@ -692,9 +691,9 @@ typedef struct _SMS_SENT_INFO_S { typedef struct _SMS_PUSH_APP_INFO_S { - char* pContentType; - char* pAppId; - SMS_WAP_APP_CODE_T appCode; + char* pContentType; + char* pAppId; + SMS_WAP_APP_CODE_T appCode; } SMS_PUSH_APP_INFO_S; @@ -709,11 +708,11 @@ typedef struct _SMS_CBMSG_DCS_S { SMS_CBMSG_CODING_GROUP_T codingGroup; /**< Coding group, GSM 03.38 */ SMS_MSG_CLASS_T classType; /**< The message class */ bool bCompressed; /**< if text is compressed this is TRUE */ - SMS_CODING_SCHEME_T codingScheme; /**< How to encode a message. */ - SMS_CBMSG_LANG_TYPE_T langType; - unsigned char iso639Lang[3]; /* 2 GSM chars and a CR char */ + SMS_CODING_SCHEME_T codingScheme; /**< How to encode a message. */ + SMS_CBMSG_LANG_TYPE_T langType; + unsigned char iso639Lang[3]; /* 2 GSM chars and a CR char */ bool bUDH; - unsigned char rawData; + unsigned char rawData; } SMS_CBMSG_DCS_S; @@ -730,7 +729,7 @@ typedef struct _SMS_CBMSG_HEADER_S { typedef struct _SMS_CBMSG_PAGE_S { SMS_CBMSG_TYPE_T cbMsgType; /*CBS Msg or SCHEDULE Msg or CBS41 Msg */ - SMS_CBMSG_HEADER_S pageHeader; /**< CB Message Header */ + SMS_CBMSG_HEADER_S pageHeader; /**< CB Message Header */ int pageLength; /**< message string length */ char pageData[MAX_CBMSG_PAGE_SIZE*8/7+1]; /**< user data */ } SMS_CBMSG_PAGE_S; @@ -752,7 +751,7 @@ typedef struct _SMS_ETWS_PRIMARY_S { unsigned short msgId; unsigned short warningType; unsigned char warningSecurityInfo[MAX_ETWS_SIZE-6]; -}SMS_ETWS_PRIMARY_S; +} SMS_ETWS_PRIMARY_S; typedef struct _SMS_WSP_CONTENTS_TYPE_S { @@ -794,7 +793,7 @@ typedef struct _SMS_WSP_METHOD_TYPE_S { typedef struct _SMS_WSP_SECURITY_TYPE_S { char* SecurityTypeName; unsigned char SecurityTypeCode; -}SMS_WSP_SECURITY_TYPE_S; +} SMS_WSP_SECURITY_TYPE_S; /** @@ -804,7 +803,7 @@ typedef struct { unsigned int totalCount; /**< The total number of SIM */ int usedCount; /**< The used number of SIM */ int indexList[MAX_SIM_SMS_NUM]; /**< The SIM index list */ -}MSG_SIM_COUNT_S; +} MSG_SIM_COUNT_S; /** @@ -821,17 +820,17 @@ typedef struct { * @brief Represents Sim Mailbox information */ typedef struct { - int b_cphs; - int rec_index; /**< index which stands for the location where record is saved in SIM*/ - int profile_num; /**< SIM profile index*/ - SMS_SIM_MAILBOX_TYPE_T mb_type; - int alpha_id_max_len; /**< alpha max length in SIM - READ ONLY*/ - char alpha_id[MAX_SIM_XDN_ALPHA_ID_LEN + 1]; /**< Alpha Identifier */ - MSG_SMS_TON_T ton; /**< Type Of Number */ - MSG_SMS_NPI_T npi; /**< Number Plan Identity */ - char num[MAX_PHONE_NUMBER_LEN + 1]; /**< Dialing Number/SSC String */ - unsigned char cc_id; /**< Capability/Configuration Identifier */ - unsigned char ext1_id; /**< Extensiion1 Record Identifier */ + int b_cphs; + int rec_index; /**< index which stands for the location where record is saved in SIM*/ + int profile_num; /**< SIM profile index*/ + SMS_SIM_MAILBOX_TYPE_T mb_type; + int alpha_id_max_len; /**< alpha max length in SIM - READ ONLY*/ + char alpha_id[MAX_SIM_XDN_ALPHA_ID_LEN + 1]; /**< Alpha Identifier */ + MSG_SMS_TON_T ton; /**< Type Of Number */ + MSG_SMS_NPI_T npi; /**< Number Plan Identity */ + char num[MAX_PHONE_NUMBER_LEN + 1]; /**< Dialing Number/SSC String */ + unsigned char cc_id; /**< Capability/Configuration Identifier */ + unsigned char ext1_id; /**< Extensiion1 Record Identifier */ int num_len; /**< Length of the original number read from SIM*/ } SMS_SIM_MAILBOX_INFO_S; @@ -849,13 +848,13 @@ typedef struct { * @brief Represents Message Waiting Indication */ typedef struct { - int rec_index; - unsigned char indicator_status; /**< Indicator Type*/ - int voice_count; /**< VoiceMail Count*/ - int fax_count; /**< FAX Count*/ - int email_count; /**< Email Count*/ - int other_count; /**< Other Count*/ - int video_count; /**< VideoMail Count*/ + int rec_index; + unsigned char indicator_status; /**< Indicator Type*/ + int voice_count; /**< VoiceMail Count*/ + int fax_count; /**< FAX Count*/ + int email_count; /**< Email Count*/ + int other_count; /**< Other Count*/ + int video_count; /**< VideoMail Count*/ } SMS_SIM_MWI_NORMAL_INFO_S; @@ -892,8 +891,8 @@ typedef struct { * @brief Represents SIM MSISDN Information */ typedef struct { - char simMsisdn[MAX_SIM_MSISDN_LEN + 1]; - int sim_index; + char simMsisdn[MAX_SIM_MSISDN_LEN + 1]; + int sim_index; } SMS_SIM_MSISDN_INFO_S; diff --git a/plugin/sms_plugin/include/SmsPluginUAManager.h b/plugin/sms_plugin/include/SmsPluginUAManager.h index 9585c3f..4c2c86a 100755 --- a/plugin/sms_plugin/include/SmsPluginUAManager.h +++ b/plugin/sms_plugin/include/SmsPluginUAManager.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "MsgMutex.h" #include "MsgQueue.h" @@ -28,7 +28,7 @@ /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginUAManager : public MsgThread { @@ -42,10 +42,10 @@ public: private: SmsPluginUAManager(); ~SmsPluginUAManager(); - void lock() { mx.lock(); }; - void unlock() { mx.unlock(); }; - void wait() { cv.wait(mx.pMsgMutex()); }; - void signal() { cv.signal(); }; + void lock() { mx.lock(); }; + void unlock() { mx.unlock(); }; + void wait() { cv.wait(mx.pMsgMutex()); }; + void signal() { cv.signal(); }; virtual void run(); diff --git a/plugin/sms_plugin/include/SmsPluginUDCodec.h b/plugin/sms_plugin/include/SmsPluginUDCodec.h index ade94f9..7185ac8 100755 --- a/plugin/sms_plugin/include/SmsPluginUDCodec.h +++ b/plugin/sms_plugin/include/SmsPluginUDCodec.h @@ -19,13 +19,13 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include "SmsPluginTypes.h" /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginUDCodec { diff --git a/plugin/sms_plugin/include/SmsPluginWapPushHandler.h b/plugin/sms_plugin/include/SmsPluginWapPushHandler.h index c46f6e8..1ab4316 100755 --- a/plugin/sms_plugin/include/SmsPluginWapPushHandler.h +++ b/plugin/sms_plugin/include/SmsPluginWapPushHandler.h @@ -19,7 +19,7 @@ /*================================================================================================== - INCLUDE FILES + INCLUDE FILES ==================================================================================================*/ #include <wbxml/wbxml.h> #include <libxml/parser.h> @@ -29,21 +29,21 @@ /*================================================================================================== - DEFINES + DEFINES ==================================================================================================*/ -#define WSP_STANDARD_STR_LEN_MAX 255 -#define LENGTH_QUOTE 0x1F -#define NO_VALUE 0x00 +#define WSP_STANDARD_STR_LEN_MAX 255 +#define LENGTH_QUOTE 0x1F +#define NO_VALUE 0x00 #define WSP_CODE_BUFFER_LEFT_LEN_MAX 1024 #define WSP_CODE_BUFFER_RIGHT_LEN_MAX 2048 -#define AcStrlen(x) ((x == NULL)?0:strlen(x)) -#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#define AcStrlen(x) ((x == NULL) ? 0 : strlen(x)) +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) /*================================================================================================== - CLASS DEFINITIONS + CLASS DEFINITIONS ==================================================================================================*/ class SmsPluginWapPushHandler { diff --git a/proxy/MsgProxyListener.cpp b/proxy/MsgProxyListener.cpp index a48c124..dc0493e 100755 --- a/proxy/MsgProxyListener.cpp +++ b/proxy/MsgProxyListener.cpp @@ -911,7 +911,7 @@ void MsgProxyListener::handleEvent(const MSG_EVENT_S* pMsgEvent) MsgDecodeMsgInfo((char *)pMsgEvent->data, &msgInfo); - MMS_RECV_DATA_S* pMmsRecvData = (MMS_RECV_DATA_S*)msgInfo.msgData; + MMS_RECV_DATA_S* pMmsRecvData = (MMS_RECV_DATA_S*)msgInfo.msgData; char* appIdKey = (pMmsRecvData->msgAppId.valid)? pMmsRecvData->msgAppId.appId: NULL; diff --git a/utils/MsgJsonParser.cpp b/utils/MsgJsonParser.cpp index 35351c7..90f2baf 100755 --- a/utils/MsgJsonParser.cpp +++ b/utils/MsgJsonParser.cpp @@ -137,7 +137,7 @@ void msg_json_gen_set_value(msg_json_gen_object *parent, const char *key, const } char* msg_json_gen_make_json_msg(msg_json_gen_object *root_obj, unsigned long *len) { - if (root_obj == NULL) { + if (root_obj == NULL) { return NULL; } JsonGenerator *generator = json_generator_new(); diff --git a/utils/MsgSmil.cpp b/utils/MsgSmil.cpp index bc935b0..7986aa1 100755 --- a/utils/MsgSmil.cpp +++ b/utils/MsgSmil.cpp @@ -610,7 +610,7 @@ char *MsgSmilGetRawData(HMsgSmil hSmilDoc) if (IsValidSmilDocNo(nSmilDocNo)) { /* xmlSaveFormatFileEnc("-", __gpaMmsSmilDoc[nSmilDocNo]->pSmilDoc, "UTF-8", 1); */ - xmlDocDumpMemory(__gpaMsgSmilDoc[nSmilDocNo]->pSmilDoc, (xmlChar **)(&pszRawData) , NULL); + xmlDocDumpMemory(__gpaMsgSmilDoc[nSmilDocNo]->pSmilDoc, (xmlChar **)(&pszRawData) , NULL); if (NULL == pszRawData) { MSG_DEBUG("Invalid pSmilDoc (now wellformed document)"); } @@ -1239,7 +1239,7 @@ xmlNode *MsgSmilCreateMMNode(MMS_MEDIA_S *pstSmilMedia, char *pszContentID) } #if 0 /* set src attribute cid */ - char szFilePathWithCid[MSG_MSG_ID_LEN + 5]; /* for "cid:" */ + char szFilePathWithCid[MSG_MSG_ID_LEN + 5]; /* for "cid:" */ snprintf (szFilePathWithCid, sizeof(szFilePathWithCid), "cid:%s", pszContentID); MsgSmilSetAttribute(pstMedia, (char *)"src", szFilePathWithCid); #endif @@ -1280,8 +1280,8 @@ bool MsgSmilInsertFirstChild(xmlNode *pstParent, xmlNode *pstCurr) MSG_BEGIN(); if (NULL == xmlAddChild(pstParent, pstCurr)) { - MSG_SEC_DEBUG("%s Node not added", pstCurr->name); - bFlag = false; + MSG_SEC_DEBUG("%s Node not added", pstCurr->name); + bFlag = false; } MSG_END(); @@ -1299,12 +1299,12 @@ bool MsgSmilInsertNode(xmlNode *pstParent, xmlNode *pstLeftSibling, xmlNode *pst pstLeftSibling = pstLeftSibling->next; if (NULL == xmlAddNextSibling(pstLeftSibling, pstCurr)) { - MSG_SEC_DEBUG("%s Node not added", pstCurr->name); - bFlag = false; + MSG_SEC_DEBUG("%s Node not added", pstCurr->name); + bFlag = false; } } else { if (NULL == xmlAddChild(pstParent, pstCurr)) { - MSG_SEC_DEBUG("%s Node not added", pstCurr->name); + MSG_SEC_DEBUG("%s Node not added", pstCurr->name); bFlag = false; } } diff --git a/utils/MsgTextConvert.cpp b/utils/MsgTextConvert.cpp index e7ece03..cf0639f 100755 --- a/utils/MsgTextConvert.cpp +++ b/utils/MsgTextConvert.cpp @@ -464,7 +464,7 @@ int MsgTextConvert::convertUTF8ToGSM7bit(OUT unsigned char *pDestText, IN int ma /** if srcTextLen ispSrcText should be null terminated return : - byte length of converted UCS2 characters + byte length of converted UCS2 characters -1 : converting error */ int MsgTextConvert::convertUTF8ToUCS2(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen) @@ -613,7 +613,7 @@ args: IN const unsigned char *pSrcText IN int srcTextLen : byte length of UCS2 source text return : - byte length of converted UTF8 characters + byte length of converted UTF8 characters -1 : The alpha isn't the gsm 7bit code */ int MsgTextConvert::convertUCS2ToUTF8(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen) @@ -1055,7 +1055,7 @@ int MsgTextConvert::convertUCS2ToASCII(OUT unsigned char *pDestText, IN int maxL int maxLength : max destination buffer size int srcTextLen : byte length of source text (gsm7bit) return : - byte length of converted UCS2 characters + byte length of converted UCS2 characters -1 : The alpha isn't the gsm 7bit code */ int MsgTextConvert::convertGSM7bitToUCS2(OUT unsigned char *pDestText, IN int maxLength, IN const unsigned char *pSrcText, IN int srcTextLen, IN MSG_LANG_INFO_S *pLangInfo) @@ -1169,7 +1169,7 @@ int MsgTextConvert::convertGSM7bitToUCS2(OUT unsigned char *pDestText, IN int ma } else { lowerByte = g_GSM7BitToUCS2[pSrcText[i]] & 0x00FF; upperByte = (g_GSM7BitToUCS2[pSrcText[i]] & 0xFF00) >> 8; - } + } } pDestText[outTextLen++] = upperByte; diff --git a/utils/MsgUtilMime.cpp b/utils/MsgUtilMime.cpp index 77acc47..93cb916 100755 --- a/utils/MsgUtilMime.cpp +++ b/utils/MsgUtilMime.cpp @@ -218,7 +218,7 @@ static const MimeTable mimeTable[] = { {"text/css", "", false, MIME_TEXT_CSS, MIME_TEXT_CSS, MIME_APPLICATION_NONE, MIME_MAINTYPE_TEXT, 0x3d }, {"text/xml", "", false, MIME_TEXT_XML, MIME_TEXT_XML, MIME_APPLICATION_NONE, MIME_MAINTYPE_TEXT, 0x28 }, {"text/iMelody", "imy", true, MIME_TEXT_IMELODY, MIME_TEXT_IMELODY, MIME_APPLICATION_SOUNDPLAYER, MIME_MAINTYPE_AUDIO, UNDEFINED_BINARY }, - {"text/calendar", "ics", true, MIME_TEXT_CALENDAR, MIME_TEXT_CALENDAR, MIME_APPLICATION_NONE, MIME_MAINTYPE_TEXT, UNDEFINED_BINARY }, + {"text/calendar", "ics", true, MIME_TEXT_CALENDAR, MIME_TEXT_CALENDAR, MIME_APPLICATION_NONE, MIME_MAINTYPE_TEXT, UNDEFINED_BINARY }, /* 136 */ {"text/vnd.wap.wmlscript", "", false, MIME_TEXT_VND_WAP_WMLSCRIPT, MIME_TEXT_VND_WAP_WMLSCRIPT, MIME_APPLICATION_NONE, MIME_MAINTYPE_TEXT, 0x09 }, diff --git a/vobject-engine/VCard.c b/vobject-engine/VCard.c index 2853176..d3aac24 100755 --- a/vobject-engine/VCard.c +++ b/vobject-engine/VCard.c @@ -187,17 +187,17 @@ char* __VCardParamEncode(VObject*, int*); #ifdef VDATA_GROUPNAME_SUPPORTED char* gszGroupName; -#endif // VDATA_GROUPNAME_SUPPORTED +#endif /* VDATA_GROUPNAME_SUPPORTED */ /** * __VCardGetName() compares the string and vCard type, parameter name. * - * @param szString Name which will compare + * @param szString Name which will compare * @param pszList[] Name list of vCard type and param - * @param size Number of total element of list + * @param size Number of total element of list * - * @return index The index in the list + * @return index The index in the list */ int __VCardGetName(char* szString, char* pszList[], int size) @@ -220,11 +220,11 @@ __VCardGetName(char* szString, char* pszList[], int size) /** * __VCardGetValue() compares the string and vCard type, parameter value. * - * @param szString Value which will compare + * @param szString Value which will compare * @param list[] Value list of vCard param - * @param size Number of total element of list + * @param size Number of total element of list * - * @return flag The value's flag. + * @return flag The value's flag. */ int __VCardGetValue(char* szString, const ValueObj list[], int size) @@ -263,10 +263,10 @@ __VCardGetValue(char* szString, const ValueObj list[], int size) * __VCardGetTypeName() fine the type name and returns the index number * * @param pVCardRaw The raw data - * @param pStatus Decoder status + * @param pStatus Decoder status * @param pDLen retrived length * - * @return res The index in type list + * @return res The index in type list */ int __VCardGetTypeName(char* pVCardRaw, int* pStatus, int* pDLen) @@ -278,7 +278,7 @@ __VCardGetTypeName(char* pVCardRaw, int* pStatus, int* pDLen) #ifdef VDATA_GROUPNAME_SUPPORTED char* szGroupName = NULL; -#endif // VDATA_GROUPNAME_SUPPORTED +#endif /* VDATA_GROUPNAME_SUPPORTED */ SysRequireEx(pVCardRaw, UNKNOWN_NAME); @@ -367,10 +367,10 @@ __VCardGetTypeName(char* pVCardRaw, int* pStatus, int* pDLen) * __VCardGetParamName() fine the param name and returns the index number * * @param pVCardRaw The raw data - * @param pStatus Decoder status + * @param pStatus Decoder status * @param pDLen retrived length * - * @return res The index in type list + * @return res The index in type list */ int __VCardGetParamName(char* pVCardRaw, int* pStatus, int* pDLen) @@ -411,9 +411,9 @@ __VCardGetParamName(char* pVCardRaw, int* pStatus, int* pDLen) TRIM(name); UPPER(name, i, index); res = __VCardGetName(name, (char**)pszCardParamList, VCARD_PARAM_NUM); - if (res == UNKNOWN_NAME) { + if (res == UNKNOWN_NAME) (*pDLen) = 0; - } + *pStatus = VCARD_PARAM_VALUE_STATUS; break; } @@ -497,9 +497,8 @@ __VCardFreeVTreeMemory(VTree * pTree) pNextObj = pCurObj->pSibling; count = pCurObj->valueCount; - for (i = 0; i < count; i++) { + for (i = 0; i < count; i++) VFREE(pCurObj->pszValue[i]); - } #ifdef VDATA_GROUPNAME_SUPPORTED if (pCurObj->pszGroupName) @@ -545,10 +544,10 @@ __VCardFreeVTreeMemory(VTree * pTree) * __VCardGetParamVal() fine the param value and returns value. * * @param pVCardRaw The raw data - * @param pStatus Decoder status + * @param pStatus Decoder status * @param pDLen retrived length * - * @return buffer The result value + * @return buffer The result value */ char* __VCardGetParamVal(char* pVCardRaw, int* pStatus, int* pDLen) @@ -565,15 +564,15 @@ __VCardGetParamVal(char* pVCardRaw, int* pStatus, int* pDLen) GO_NEXT_CHAR(c, pVCardRaw, pDLen); len++; switch (c) { - case VTYPE_TOKEN_SEMICOLON: - *pStatus = VCARD_PARAM_NAME_STATUS; - break; - case VTYPE_TOKEN_COLON: - *pStatus = VCARD_TYPE_VALUE_STATUS; - break; - case VTYPE_TOKEN_COMMA: - *pStatus = VCARD_PARAM_VALUE_STATUS; - break; + case VTYPE_TOKEN_SEMICOLON: + *pStatus = VCARD_PARAM_NAME_STATUS; + break; + case VTYPE_TOKEN_COLON: + *pStatus = VCARD_TYPE_VALUE_STATUS; + break; + case VTYPE_TOKEN_COMMA: + *pStatus = VCARD_PARAM_VALUE_STATUS; + break; } if (c == VTYPE_TOKEN_SEMICOLON || c == VTYPE_TOKEN_COLON @@ -601,9 +600,9 @@ __VCardGetParamVal(char* pVCardRaw, int* pStatus, int* pDLen) /** * __VCardGetTypeVal() fine the type value and returns value. * - * @param pVCardRaw The raw data + * @param pVCardRaw The raw data * @param status Decoder status - * @return buffer The result value + * @return buffer The result value */ char* __VCardGetTypeVal(char* pVCardRaw, int* pStatus, int* pDLen, int enc, VObject* pType) @@ -704,7 +703,7 @@ __VCardGetTypeVal(char* pVCardRaw, int* pStatus, int* pDLen, int enc, VObject* p len++; } } else if (__VCardGetTypeName(pVCardRaw, &Status, &Len) != UNKNOWN_NAME) { - --len; + --len; if ((pBuf = (char *)calloc(1, len)) == NULL) return NULL; memset(pBuf, 0x00, len); @@ -835,7 +834,7 @@ VTree* vcard_decode(char *pCardRaw) int param_status = false; int numberedParam = 0; int enc = 0; - //int start_status = 0; + /* int start_status = 0; */ char* temp = NULL; bool vcard_ended = false; @@ -845,9 +844,9 @@ VTree* vcard_decode(char *pCardRaw) VDATA_TRACE("length of pCardRaw = %d", len); pCardRaw = _VUnfoldingNoSpecNew(pCardRaw); - if (pCardRaw == NULL) { + if (pCardRaw == NULL) return NULL; - } + pCardRawTmp = pCardRaw; len = _VManySpace2Space(pCardRaw); @@ -867,177 +866,176 @@ VTree* vcard_decode(char *pCardRaw) break; switch (status) { - case VCARD_TYPE_NAME_STATUS: + case VCARD_TYPE_NAME_STATUS: + dLen = 0; + type = __VCardGetTypeName(pCardRaw, &status, &dLen); + pCardRaw += dLen; + + if (type == -1) + break; + + switch (type) { + case VCARD_TYPE_BEGIN: + if (pVCard) { + free(pVCard); + pVCard = NULL; + } + + if ((pVCard = (VTree*)calloc(1, sizeof(VTree))) == NULL) { + /* start_status = 1; */ + goto CATCH; + } + + memset(pVCard, 0x00, sizeof(VTree)); + dLen = 0; - type = __VCardGetTypeName(pCardRaw, &status, &dLen); + szCardBegin = __VCardGetTypeVal(pCardRaw, &status, &dLen, enc, NULL); pCardRaw += dLen; + VFREE(szCardBegin); + + pVCard->treeType = VCARD; + pVCard->pTop = NULL; + pVCard->pCur = NULL; + pVCard->pNext = NULL; + break; + + case VCARD_TYPE_END: + enc = 0; + if (strstr(pCardRaw, "VCARD") != NULL) { + pCardRaw += dLen; + done = true; + vcard_ended = true; + } else { + status = VCARD_TYPE_NAME_STATUS; + pCardRaw += dLen; + /*VFREE(etemp); */ + } + break; - if (type == -1) + case UNKNOWN_NAME: + break; + + default: + if (UNKNOWN_NAME == type || type < 0) { + status = VCARD_TYPE_NAME_STATUS; break; + } + + if ((pTemp = (VObject*)calloc(1, sizeof(VObject))) == NULL) + goto CATCH; + + memset(pTemp, 0, sizeof(VObject)); + pTemp->property = type; - switch (type) { - case VCARD_TYPE_BEGIN: - if (pVCard) { - free(pVCard); - pVCard = NULL; - } - - if ((pVCard = (VTree*)calloc(1, sizeof(VTree))) == NULL) { - //start_status = 1; - goto CATCH; - } - - memset(pVCard, 0x00, sizeof(VTree)); - - dLen = 0; - szCardBegin = __VCardGetTypeVal(pCardRaw, &status, &dLen, enc, NULL); - pCardRaw += dLen; - VFREE(szCardBegin); - - pVCard->treeType = VCARD; - pVCard->pTop = NULL; - pVCard->pCur = NULL; - pVCard->pNext = NULL; - break; - - case VCARD_TYPE_END: - enc = 0; - if (strstr(pCardRaw, "VCARD") != NULL) { - pCardRaw += dLen; - done = true; - vcard_ended = true; - } else { - status = VCARD_TYPE_NAME_STATUS; - pCardRaw += dLen; - /*VFREE(etemp); */ - } - break; - - case UNKNOWN_NAME: - break; - - default: - if (UNKNOWN_NAME == type || type < 0) { - status = VCARD_TYPE_NAME_STATUS; - break; - } - - if ((pTemp = (VObject*)calloc(1, sizeof(VObject))) == NULL) { - goto CATCH; - } - - memset(pTemp, 0, sizeof(VObject)); - pTemp->property = type; - - if (pVCard->pTop == NULL) { - pVCard->pTop = pTemp; - pVCard->pCur = pTemp; - } else { - pVCard->pCur->pSibling = pTemp; - pVCard->pCur = pTemp; - } - - break; + if (pVCard->pTop == NULL) { + pVCard->pTop = pTemp; + pVCard->pCur = pTemp; + } else { + pVCard->pCur->pSibling = pTemp; + pVCard->pCur = pTemp; } - numberedParam = 0; - param_status = false; - valueCount = 0; + break; + } + + numberedParam = 0; + param_status = false; + valueCount = 0; #ifdef VDATA_GROUPNAME_SUPPORTED - if (gszGroupName != NULL) - pVCard->pCur->pszGroupName = gszGroupName; + if (gszGroupName != NULL) + pVCard->pCur->pszGroupName = gszGroupName; #endif - break; + break; - case VCARD_PARAM_NAME_STATUS: - { - dLen = 0; - param = __VCardGetParamName(pCardRaw, &status, &dLen); - pCardRaw += dLen; + case VCARD_PARAM_NAME_STATUS: + { + dLen = 0; + param = __VCardGetParamName(pCardRaw, &status, &dLen); + pCardRaw += dLen; - if (param_status != true) { + if (param_status != true) { - if ((pTmpParam = (VParam*)calloc(1, sizeof(VParam))) == NULL) - goto CATCH; + if ((pTmpParam = (VParam*)calloc(1, sizeof(VParam))) == NULL) + goto CATCH; - param_status = true; - pVCard->pCur->pParam = pTmpParam; - memset(pTmpParam, 0x00, sizeof(VParam)); - VDATA_TRACE("pTmpParam : %p", pTmpParam); - } else { - if ((pTmpParam->pNext = (VParam*)calloc(1, sizeof(VParam))) == NULL) - goto CATCH; + param_status = true; + pVCard->pCur->pParam = pTmpParam; + memset(pTmpParam, 0x00, sizeof(VParam)); + VDATA_TRACE("pTmpParam : %p", pTmpParam); + } else { + if ((pTmpParam->pNext = (VParam*)calloc(1, sizeof(VParam))) == NULL) + goto CATCH; - pTmpParam = pTmpParam->pNext; - memset(pTmpParam, 0x00, sizeof(VParam)); - VDATA_TRACE("pTmpParam : %p", pTmpParam); - } + pTmpParam = pTmpParam->pNext; + memset(pTmpParam, 0x00, sizeof(VParam)); + VDATA_TRACE("pTmpParam : %p", pTmpParam); + } - pTmpParam->parameter = param; + pTmpParam->parameter = param; + break; + } + case VCARD_PARAM_VALUE_STATUS: + dLen = 0; + numberedParam = 0; + switch (pTmpParam->parameter) { + case VCARD_PARAM_TYPE: + szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); + numberedParam |= __VCardGetValue(szValue, pTypeList, VCARD_TYPE_PARAM_NUM); break; - } - case VCARD_PARAM_VALUE_STATUS: - dLen = 0; + case VCARD_PARAM_VALUE: + szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); + numberedParam |= __VCardGetValue(szValue, pValueList, VCARD_VALUE_PARAM_NUM); + break; + case VCARD_PARAM_ENCODING: + szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); + numberedParam |= __VCardGetValue(szValue, pEncList, VCARD_ENCODE_PARAM_NUM); + enc = numberedParam; + break; + case VCARD_PARAM_CHARSET: + szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); + numberedParam |= __VCardGetValue(szValue, pCharsetList, VCARD_CHARSET_PARAM_NUM); + break; + case VCARD_PARAM_CONTEXT: + case VCARD_PARAM_LANGUAGE: + /* prevent 7605 08.03.13 */ + szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); numberedParam = 0; - switch (pTmpParam->parameter) { - case VCARD_PARAM_TYPE: - szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); - numberedParam |= __VCardGetValue(szValue, pTypeList, VCARD_TYPE_PARAM_NUM); - break; - case VCARD_PARAM_VALUE: - szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); - numberedParam |= __VCardGetValue(szValue, pValueList, VCARD_VALUE_PARAM_NUM); - break; - case VCARD_PARAM_ENCODING: - szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); - numberedParam |= __VCardGetValue(szValue, pEncList, VCARD_ENCODE_PARAM_NUM); - enc = numberedParam; - break; - case VCARD_PARAM_CHARSET: - szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); - numberedParam |= __VCardGetValue(szValue, pCharsetList, VCARD_CHARSET_PARAM_NUM); - break; - case VCARD_PARAM_CONTEXT: - case VCARD_PARAM_LANGUAGE: - // prevent 7605 08.03.13 - szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); - numberedParam = 0; - break; - default: - szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); - - SET_PARAM_VALUE(numberedParam, szValue, pTypeList, VCARD_TYPE_PARAM_NUM, pTmpParam, VCARD_PARAM_TYPE, enc); - SET_PARAM_VALUE(numberedParam, szValue, pValueList, VCARD_VALUE_PARAM_NUM, pTmpParam, VCARD_PARAM_VALUE, enc); - SET_PARAM_VALUE(numberedParam, szValue, pEncList, VCARD_ENCODE_PARAM_NUM, pTmpParam, VCARD_PARAM_ENCODING, enc); - SET_PARAM_VALUE(numberedParam, szValue, pCharsetList, VCARD_CHARSET_PARAM_NUM, pTmpParam, VCARD_PARAM_CHARSET, enc); - - numberedParam = 0; - pCardRaw += dLen; - dLen = 0; - - break; - } - - VDATA_TRACE("%d, %s, %p", numberedParam, szValue, pTmpParam); - pTmpParam->paramValue = numberedParam; - pTmpParam->pNext = NULL; - VFREE(szValue); - pCardRaw += dLen; break; - case VCARD_TYPE_VALUE_STATUS: - dLen = 0; - temp = __VCardGetTypeVal(pCardRaw, &status, &dLen, enc, pVCard->pCur); + default: + szValue = __VCardGetParamVal(pCardRaw, &status, &dLen); - if (valueCount < VDATA_VALUE_COUNT_MAX) { - pVCard->pCur->pszValue[valueCount] = temp; - valueCount++; - pVCard->pCur->valueCount = valueCount; - } else - VFREE(temp); + SET_PARAM_VALUE(numberedParam, szValue, pTypeList, VCARD_TYPE_PARAM_NUM, pTmpParam, VCARD_PARAM_TYPE, enc); + SET_PARAM_VALUE(numberedParam, szValue, pValueList, VCARD_VALUE_PARAM_NUM, pTmpParam, VCARD_PARAM_VALUE, enc); + SET_PARAM_VALUE(numberedParam, szValue, pEncList, VCARD_ENCODE_PARAM_NUM, pTmpParam, VCARD_PARAM_ENCODING, enc); + SET_PARAM_VALUE(numberedParam, szValue, pCharsetList, VCARD_CHARSET_PARAM_NUM, pTmpParam, VCARD_PARAM_CHARSET, enc); + numberedParam = 0; pCardRaw += dLen; + dLen = 0; + break; + } + + VDATA_TRACE("%d, %s, %p", numberedParam, szValue, pTmpParam); + pTmpParam->paramValue = numberedParam; + pTmpParam->pNext = NULL; + VFREE(szValue); + pCardRaw += dLen; + break; + case VCARD_TYPE_VALUE_STATUS: + dLen = 0; + temp = __VCardGetTypeVal(pCardRaw, &status, &dLen, enc, pVCard->pCur); + + if (valueCount < VDATA_VALUE_COUNT_MAX) { + pVCard->pCur->pszValue[valueCount] = temp; + valueCount++; + pVCard->pCur->valueCount = valueCount; + } else + VFREE(temp); + + pCardRaw += dLen; + break; } } @@ -1046,9 +1044,9 @@ VTree* vcard_decode(char *pCardRaw) if (pVCard->pTop == NULL) goto CATCH; - if (!vcard_ended) { + if (!vcard_ended) goto CATCH1; - } + VDATA_TRACE_END return pVCard; @@ -1075,8 +1073,8 @@ char* vcard_encode(VTree *pVCardRaw) char* pTemp = NULL; int len; int total = 0; - int cnt = 0; - int lenTypeList = 0; + int cnt = 0; + int lenTypeList = 0; LENGTH_TYPE_LIST(pszCardTypeList, lenTypeList); @@ -1087,7 +1085,7 @@ char* vcard_encode(VTree *pVCardRaw) SysRequireEx(pVCardRaw->treeType == VCARD, NULL); SysRequireEx(pVCardRaw->pTop->valueCount > 0, NULL); - //VDATA_TRACE("START %d %d", pVCardRaw->pTop->property, lenTypeList); + /* VDATA_TRACE("START %d %d", pVCardRaw->pTop->property, lenTypeList); */ for (; cnt < pVCardRaw->pTop->valueCount; cnt++) { @@ -1166,14 +1164,14 @@ __VIsVcardFile(char *pCardRaw, int mode) char *pszVcardBegin = "BEGIN:VCARD"; switch (mode) { - case CHECK_START: - for (i = 0; i < 11; i++) - if (*pszVcardBegin++ != *pCardRaw++) - rtnValue = false; - break; - - default: - rtnValue = false; + case CHECK_START: + for (i = 0; i < 11; i++) + if (*pszVcardBegin++ != *pCardRaw++) + rtnValue = false; + break; + + default: + rtnValue = false; } VDATA_TRACE_END return rtnValue; @@ -1205,10 +1203,10 @@ __VCardTypeEncode(VObject *pTypeObj, char *pType) biLen = pTypeObj->numOfBiData; #ifdef VDATA_GROUPNAME_SUPPORTED - if (pTypeObj->pszGroupName != NULL) { + if (pTypeObj->pszGroupName != NULL) len += strlen(pTypeObj->pszGroupName) + 1; - } -#endif // VDATA_GROUPNAME_SUPPORTED +#endif /* VDATA_GROUPNAME_SUPPORTED */ + if ((szTypeValue = (char *)calloc(1, total += (len+1))) == NULL) { VDATA_TRACE("__VCardTypeEncode():calloc failed\n"); VDATA_TRACE_END @@ -1220,7 +1218,7 @@ __VCardTypeEncode(VObject *pTypeObj, char *pType) g_strlcat(szTypeValue, pTypeObj->pszGroupName, total - strlen(szTypeValue)); g_strlcat(szTypeValue, ".", total - strlen(szTypeValue)); } -#endif // VDATA_GROUPNAME_SUPPORTED +#endif /* VDATA_GROUPNAME_SUPPORTED */ g_strlcat(szTypeValue, pType, total - strlen(szTypeValue)); pTemp = __VCardParamEncode(pTypeObj, &enc); @@ -1252,7 +1250,7 @@ __VCardTypeEncode(VObject *pTypeObj, char *pType) if (pTypeObj->pszValue[i] != NULL) len += strlen(pTypeObj->pszValue[i]); - } + } } else { len += biLen; } @@ -1409,29 +1407,29 @@ __VCardParamEncode(VObject* pTypeObj, int* pEnc) /** Set Parameter Value name. */ switch (pTemp->parameter) { - case VCARD_PARAM_ENCODING: - *pEnc = pTemp->paramValue; - shift = VCARD_ENCODE_PARAM_NUM; - pList = pEncList; bSupported = true; - break; - case VCARD_PARAM_TYPE: - shift = VCARD_TYPE_PARAM_NUM; - pList = pTypeList; bSupported = true; - break; - case VCARD_PARAM_VALUE: - shift = VCARD_VALUE_PARAM_NUM; - pList = pValueList; bSupported = true; - break; - case VCARD_PARAM_CHARSET: - shift = VCARD_CHARSET_PARAM_NUM; - pList = pCharsetList; bSupported = true; - break; - default: - if ((szParam = (char*)realloc(szParam, 5)) == NULL) { - VDATA_TRACE_END - return NULL; - } - g_strlcat(szParam, "NONE", 5 - strlen(szParam)); + case VCARD_PARAM_ENCODING: + *pEnc = pTemp->paramValue; + shift = VCARD_ENCODE_PARAM_NUM; + pList = pEncList; bSupported = true; + break; + case VCARD_PARAM_TYPE: + shift = VCARD_TYPE_PARAM_NUM; + pList = pTypeList; bSupported = true; + break; + case VCARD_PARAM_VALUE: + shift = VCARD_VALUE_PARAM_NUM; + pList = pValueList; bSupported = true; + break; + case VCARD_PARAM_CHARSET: + shift = VCARD_CHARSET_PARAM_NUM; + pList = pCharsetList; bSupported = true; + break; + default: + if ((szParam = (char*)realloc(szParam, 5)) == NULL) { + VDATA_TRACE_END + return NULL; + } + g_strlcat(szParam, "NONE", 5 - strlen(szParam)); } /** exchage parameter value's to string.*/ diff --git a/vobject-engine/VCardCalUtil.c b/vobject-engine/VCardCalUtil.c index 78988b0..9a94037 100755 --- a/vobject-engine/VCardCalUtil.c +++ b/vobject-engine/VCardCalUtil.c @@ -54,7 +54,7 @@ int __VIsPrintable(char); int _VIsSpace(char in) { - if ((in == TAB) || (in == WSP)) + if ((in == TAB) || (in == WSP)) return 1; else return 0; @@ -70,28 +70,26 @@ _VIsSpace(char in) int _VRLSpace(char *in) { - int i, j; - short int done; + int i, j; + short int done; - i = 0; - done = 0; + i = 0; + done = 0; - while (!done && in[i]) { + while (!done && in[i]) { if (_VIsSpace(in[i])) i++; else done = 1; - } + } - j = 0; - while (in[i]) { + j = 0; + while (in[i]) in[j++] = in[i++]; - } - - in[j] = '\0'; + in[j] = '\0'; - return 0; + return 0; } @@ -104,20 +102,20 @@ _VRLSpace(char *in) int _VRTSpace(char *in) { - int i; - short int done; + int i; + short int done; - i = strlen(in) - 1; - done = 0; + i = strlen(in) - 1; + done = 0; - while (!done && !(i < 0)) { + while (!done && !(i < 0)) { if (_VIsSpace(in[i])) in[i--] = '\0'; else done = 1; - } + } - return(0); + return(0); } @@ -173,9 +171,9 @@ _VEscape(char *in) if (buf) { for (i = 0, index = 0; i < len; i++) { c = in[i]; - if (c == ';') { + if (c == ';') buf[index++] = '\\'; - } + buf[index++] = c; } @@ -183,7 +181,7 @@ _VEscape(char *in) free(buf); } - return(0); + return(0); } @@ -197,11 +195,11 @@ _VEscape(char *in) int _VManySpace2Space(char *in) { - int i, j; - int spaced = 0; + int i, j; + int spaced = 0; - j = 0; - for (i = 0; in[i]; i++) { + j = 0; + for (i = 0; in[i]; i++) { if (_VIsSpace(in[i])) { if (!spaced) { in[j] = WSP; @@ -213,12 +211,12 @@ _VManySpace2Space(char *in) in[j] = in[i]; j++; } - } + } - in[j] = '\0'; + in[j] = '\0'; - return j; + return j; } @@ -231,13 +229,13 @@ _VManySpace2Space(char *in) int __VFindBase64(char in) { - int i; + int i; - for (i = 0; i < 65; i++) { + for (i = 0; i < 65; i++) { if (Base64Table[i] == in) return i; - } - return -1; + } + return -1; } @@ -548,17 +546,17 @@ __VIsNewType(char *pCardRaw) } - for (low = 0, high = VCARD_TYPE_NUM - 1; high >= low; diff < 0 ? (low = i+1) : (high = i-1)) { + for (low = 0, high = VCARD_TYPE_NUM - 1; high >= low; diff < 0 ? (low = i+1) : (high = i-1)) { i = (low + high) / 2; diff = strcmp(pszCardTypeList[i], strTypeName); - if (diff == 0) /* success: found it */ + if (diff == 0) /* success: found it */ return true; - } + } - return false; - //res = __VCardGetName(strTypeName, (char**)pszCardTypeList, VCARD_TYPE_NUM); + return false; + /* res = __VCardGetName(strTypeName, (char**)pszCardTypeList, VCARD_TYPE_NUM); */ } @@ -596,7 +594,7 @@ __VIsNewTypeforOrg(char *pCardRaw, int vType) else if (vType == VMESSAGE) diff = strcmp(pszMsgTypeList[i], strTypeName); - if (diff == 0) /* success: found it */ + if (diff == 0) /* success: found it */ return true; else if (!strncmp(strTypeName, "X-", 2)) return true; @@ -604,7 +602,7 @@ __VIsNewTypeforOrg(char *pCardRaw, int vType) /* if (count <= 50) return TRUE; */ - return false; + return false; /* res = __VCardGetName(strTypeName, (char**)pszCardTypeList, VCARD_TYPE_NUM); */ } @@ -619,10 +617,8 @@ _VUnfoldingNoSpecNew(char *string) len = strlen(string); - if (!(newString = (char*) calloc(1, len+1))) { + if (!(newString = (char*) calloc(1, len+1))) return NULL; - } - for (i = 0, j = 0; i < len; i++, j++) { diff --git a/vobject-engine/VMessage.c b/vobject-engine/VMessage.c index 2820504..782733d 100755 --- a/vobject-engine/VMessage.c +++ b/vobject-engine/VMessage.c @@ -167,11 +167,11 @@ char* __VMsgParamEncode(VObject*, int*); /** * __VMsgGetName() compares the string and vMsg type, parameter name. * - * @param szString Name which will compare + * @param szString Name which will compare * @param pszList[] Name list of vMsg type and param - * @param size Number of total element of list + * @param size Number of total element of list * - * @return index The index in the list + * @return index The index in the list */ int __VMsgGetName(char* szString, char* pszList[], int size) @@ -194,11 +194,11 @@ __VMsgGetName(char* szString, char* pszList[], int size) /** * __VMsgGetValue() compares the string and vMsg type, parameter value. * - * @param szString Value which will compare + * @param szString Value which will compare * @param list[] Value list of vMsg param - * @param size Number of total element of list + * @param size Number of total element of list * - * @return flag The value's flag. + * @return flag The value's flag. */ int __VMsgGetValue(char* szString, const ValueObj list[], int size) @@ -237,10 +237,10 @@ __VMsgGetValue(char* szString, const ValueObj list[], int size) * __VMsgGetTypeName() fine the type name and returns the index number * * @param pVMsgRaw The raw data - * @param pStatus Decoder status + * @param pStatus Decoder status * @param pDLen retrived length * - * @return res The index in type list + * @return res The index in type list */ int __VMsgGetTypeName(char* pVMsgRaw, int* pStatus, int* pDLen) @@ -325,10 +325,10 @@ __VMsgGetTypeName(char* pVMsgRaw, int* pStatus, int* pDLen) * __VMsgGetParamName() fine the param name and returns the index number * * @param pVMsgRaw The raw data - * @param pStatus Decoder status + * @param pStatus Decoder status * @param pDLen retrived length * - * @return res The index in type list + * @return res The index in type list */ int __VMsgGetParamName(char* pVMsgRaw, int* pStatus, int* pDLen) @@ -369,9 +369,8 @@ __VMsgGetParamName(char* pVMsgRaw, int* pStatus, int* pDLen) TRIM(name); UPPER(name, i, index); res = __VMsgGetName(name, (char**)pszMsgParamList, VMSG_PARAM_NUM); - if (res == UNKNOWN_NAME) { + if (res == UNKNOWN_NAME) (*pDLen) = 0; - } *pStatus = VMSG_PARAM_VALUE_STATUS; break; } @@ -455,9 +454,8 @@ __VMsgFreeVTreeMemory(VTree * pTree) pNextObj = pCurObj->pSibling; count = pCurObj->valueCount; - for (i = 0; i < count; i++) { + for (i = 0; i < count; i++) VFREE(pCurObj->pszValue[i]); - } if (pCurObj->pParam) { @@ -498,10 +496,10 @@ __VMsgFreeVTreeMemory(VTree * pTree) * __VMsgGetParamVal() fine the param value and returns value. * * @param pVMsgRaw The raw data - * @param pStatus Decoder status + * @param pStatus Decoder status * @param pDLen retrived length * - * @return buffer The result value + * @return buffer The result value */ char* __VMsgGetParamVal(char* pVMsgRaw, int* pStatus, int* pDLen) @@ -518,15 +516,15 @@ __VMsgGetParamVal(char* pVMsgRaw, int* pStatus, int* pDLen) GO_NEXT_CHAR(c, pVMsgRaw, pDLen); len++; switch (c) { - case VTYPE_TOKEN_SEMICOLON: - *pStatus = VMSG_PARAM_NAME_STATUS; - break; - case VTYPE_TOKEN_COLON: - *pStatus = VMSG_TYPE_VALUE_STATUS; - break; - case VTYPE_TOKEN_COMMA: - *pStatus = VMSG_PARAM_VALUE_STATUS; - break; + case VTYPE_TOKEN_SEMICOLON: + *pStatus = VMSG_PARAM_NAME_STATUS; + break; + case VTYPE_TOKEN_COLON: + *pStatus = VMSG_TYPE_VALUE_STATUS; + break; + case VTYPE_TOKEN_COMMA: + *pStatus = VMSG_PARAM_VALUE_STATUS; + break; } if (c == VTYPE_TOKEN_SEMICOLON || c == VTYPE_TOKEN_COLON @@ -548,9 +546,9 @@ __VMsgGetParamVal(char* pVMsgRaw, int* pStatus, int* pDLen) /** * __VMsgGetTypeVal() fine the type value and returns value. * - * @param pVMsgRaw The raw data + * @param pVMsgRaw The raw data * @param status Decoder status - * @return buffer The result value + * @return buffer The result value */ char* __VMsgGetTypeVal(char* pVMsgRaw, int* pStatus, int* pDLen, int enc, VObject* pType) @@ -818,214 +816,212 @@ VTree* vmsg_decode(char *pMsgRaw) break; switch (status) { - case VMSG_TYPE_NAME_STATUS: - dLen = 0; - type = __VMsgGetTypeName(pMsgRaw, &status, &dLen); + case VMSG_TYPE_NAME_STATUS: + dLen = 0; + type = __VMsgGetTypeName(pMsgRaw, &status, &dLen); - if (type == VMSG_TYPE_BEGIN) - pVTree = pMsgRaw; - - pMsgRaw += dLen; - - if (type == -1) - break; + if (type == VMSG_TYPE_BEGIN) + pVTree = pMsgRaw; - switch (type) { - case VMSG_TYPE_BEGIN: - dLen = 0; - enc = 0; - szMsgBegin = __VMsgGetTypeVal(pMsgRaw, &status, &dLen, enc, NULL); - pMsgRaw += dLen; + pMsgRaw += dLen; - if (szMsgBegin == NULL) - goto CATCH; + if (type == -1) + break; - if (!strncmp(szMsgBegin, "VCARD", strlen("VCARD"))) { - VDATA_TRACE("pVTree: %s", pVTree); - pVCard = vcard_decode(pVTree); - pCurrent->pNext = pVCard; - pCurrent = pVCard; - - dLen = ((strstr(pMsgRaw, "END:VCARD") + 9) - pMsgRaw); - pMsgRaw += dLen; - } else { - - if (start_status == 1) - goto CATCH; - - - if (!strncmp(szMsgBegin, "VMSG", strlen("VMSG"))) { - if ((pVMsg = (VTree*)calloc(1, sizeof(VTree))) == NULL) { - start_status = 1; - goto CATCH; - } - memset(pVMsg, 0x00, sizeof(VTree)); - - pVMsg->treeType = VMESSAGE; - pVMsg->pTop = NULL; - pVMsg->pCur = NULL; - pVMsg->pNext = NULL; - pCurrent = pVMsg; - } else if (!strncmp(szMsgBegin, "VBODY", strlen("VBODY"))) { - if ((pVBody = (VTree*)calloc(1, sizeof(VTree))) == NULL) { - start_status = 1; - goto CATCH; - } - - memset(pVBody, 0x00, sizeof(VTree)); - pVBody->treeType = VBODY; - pVBody->pTop = NULL; - pVBody->pCur = NULL; - pVBody->pNext = NULL; - pCurrent->pNext = pVBody; - pCurrent = pVBody; - } - } + switch (type) { + case VMSG_TYPE_BEGIN: + dLen = 0; + enc = 0; + szMsgBegin = __VMsgGetTypeVal(pMsgRaw, &status, &dLen, enc, NULL); + pMsgRaw += dLen; - VFREE(szMsgBegin); - break; + if (szMsgBegin == NULL) + goto CATCH; - case VMSG_TYPE_END: - dLen = 0; - enc = 0; - //szMsgBegin = __VMsgGetTypeVal(pMsgRaw, &status, &dLen, enc, NULL); - - if (!strncmp(pMsgRaw, "VMSG", strlen("VMSG"))) { - done = true; - vmsg_ended = true; - } else { - status = VMSG_TYPE_NAME_STATUS; - //pMsgRaw += dLen; - } - VDATA_TRACE("pMsgRaw:%s", pMsgRaw); - pMsgRaw += dLen; - break; + if (!strncmp(szMsgBegin, "VCARD", strlen("VCARD"))) { + VDATA_TRACE("pVTree: %s", pVTree); + pVCard = vcard_decode(pVTree); + pCurrent->pNext = pVCard; + pCurrent = pVCard; - case UNKNOWN_NAME: - break; + dLen = ((strstr(pMsgRaw, "END:VCARD") + 9) - pMsgRaw); + pMsgRaw += dLen; + } else { - default: - if (UNKNOWN_NAME == type || type < 0) { - status = VMSG_TYPE_NAME_STATUS; - break; - } + if (start_status == 1) + goto CATCH; - if ((pTemp = (VObject*)calloc(1, sizeof(VObject))) == NULL) { + if (!strncmp(szMsgBegin, "VMSG", strlen("VMSG"))) { + if ((pVMsg = (VTree*)calloc(1, sizeof(VTree))) == NULL) { + start_status = 1; goto CATCH; } - - memset(pTemp, 0, sizeof(VObject)); - pTemp->property = type; - - if (pCurrent->pTop == NULL) { - pCurrent->pTop = pTemp; - pCurrent->pCur = pTemp; - } else { - pCurrent->pCur->pSibling = pTemp; - pCurrent->pCur = pTemp; + memset(pVMsg, 0x00, sizeof(VTree)); + + pVMsg->treeType = VMESSAGE; + pVMsg->pTop = NULL; + pVMsg->pCur = NULL; + pVMsg->pNext = NULL; + pCurrent = pVMsg; + } else if (!strncmp(szMsgBegin, "VBODY", strlen("VBODY"))) { + if ((pVBody = (VTree*)calloc(1, sizeof(VTree))) == NULL) { + start_status = 1; + goto CATCH; } - break; + memset(pVBody, 0x00, sizeof(VTree)); + pVBody->treeType = VBODY; + pVBody->pTop = NULL; + pVBody->pCur = NULL; + pVBody->pNext = NULL; + pCurrent->pNext = pVBody; + pCurrent = pVBody; + } } - numberedParam = 0; - param_status = false; - valueCount = 0; + VFREE(szMsgBegin); break; - case VMSG_PARAM_NAME_STATUS: - { + case VMSG_TYPE_END: dLen = 0; - param = __VMsgGetParamName(pMsgRaw, &status, &dLen); + enc = 0; + /* szMsgBegin = __VMsgGetTypeVal(pMsgRaw, &status, &dLen, enc, NULL); */ + + if (!strncmp(pMsgRaw, "VMSG", strlen("VMSG"))) { + done = true; + vmsg_ended = true; + } else { + status = VMSG_TYPE_NAME_STATUS; + /* pMsgRaw += dLen; */ + } + VDATA_TRACE("pMsgRaw:%s", pMsgRaw); pMsgRaw += dLen; + break; - if (param_status != true) { + case UNKNOWN_NAME: + break; - if ((pTmpParam = (VParam*)calloc(1, sizeof(VParam))) == NULL) - goto CATCH; + default: + if (UNKNOWN_NAME == type || type < 0) { + status = VMSG_TYPE_NAME_STATUS; + break; + } - param_status = true; - pCurrent->pCur->pParam = pTmpParam; - memset(pTmpParam, 0x00, sizeof(VParam)); - VDATA_TRACE("pTmpParam : %p", pTmpParam); - } else { - if ((pTmpParam->pNext = (VParam*)calloc(1, sizeof(VParam))) == NULL) - goto CATCH; + if ((pTemp = (VObject*)calloc(1, sizeof(VObject))) == NULL) + goto CATCH; - pTmpParam = pTmpParam->pNext; - memset(pTmpParam, 0x00, sizeof(VParam)); - VDATA_TRACE("pTmpParam : %p", pTmpParam); + memset(pTemp, 0, sizeof(VObject)); + pTemp->property = type; + + if (pCurrent->pTop == NULL) { + pCurrent->pTop = pTemp; + pCurrent->pCur = pTemp; + } else { + pCurrent->pCur->pSibling = pTemp; + pCurrent->pCur = pTemp; } - pTmpParam->parameter = param; break; } - case VMSG_PARAM_VALUE_STATUS: - dLen = 0; - numberedParam = 0; - switch (pTmpParam->parameter) { - case VMSG_PARAM_TYPE: - szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); - numberedParam |= __VMsgGetValue(szValue, pMsgTypeList, VMSG_TYPE_PARAM_NUM); - break; - case VMSG_PARAM_VALUE: - szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); - numberedParam |= __VMsgGetValue(szValue, pMsgValueList, VMSG_VALUE_PARAM_NUM); - break; - case VMSG_PARAM_ENCODING: - szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); - numberedParam |= __VMsgGetValue(szValue, pMsgEncList, VMSG_ENCODE_PARAM_NUM); - enc = numberedParam; - break; - case VMSG_PARAM_CHARSET: - szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); - numberedParam |= __VMsgGetValue(szValue, pMsgCharsetList, VMSG_CHARSET_PARAM_NUM); - break; - case VMSG_PARAM_CONTEXT: - case VMSG_PARAM_LANGUAGE: - // prevent 7605 08.03.13 - szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); - numberedParam = 0; - break; - default: - szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); - SET_PARAM_VALUE(numberedParam, szValue, pMsgTypeList, VMSG_TYPE_PARAM_NUM, pTmpParam, VMSG_PARAM_TYPE, enc); - SET_PARAM_VALUE(numberedParam, szValue, pMsgValueList, VMSG_VALUE_PARAM_NUM, pTmpParam, VMSG_PARAM_VALUE, enc); - SET_PARAM_VALUE(numberedParam, szValue, pMsgEncList, VMSG_ENCODE_PARAM_NUM, pTmpParam, VMSG_PARAM_ENCODING, enc); - SET_PARAM_VALUE(numberedParam, szValue, pMsgCharsetList, VMSG_CHARSET_PARAM_NUM, pTmpParam, VMSG_PARAM_CHARSET, enc); + numberedParam = 0; + param_status = false; + valueCount = 0; + break; - numberedParam = 0; - pMsgRaw += dLen; - dLen = 0; + case VMSG_PARAM_NAME_STATUS: + { + dLen = 0; + param = __VMsgGetParamName(pMsgRaw, &status, &dLen); + pMsgRaw += dLen; - break; - } + if (param_status != true) { - VDATA_TRACE("%d, %s, %p", numberedParam, szValue, pTmpParam); - pTmpParam->paramValue = numberedParam; - pTmpParam->pNext = NULL; - VFREE(szValue); - pMsgRaw += dLen; + if ((pTmpParam = (VParam*)calloc(1, sizeof(VParam))) == NULL) + goto CATCH; + + param_status = true; + pCurrent->pCur->pParam = pTmpParam; + memset(pTmpParam, 0x00, sizeof(VParam)); + VDATA_TRACE("pTmpParam : %p", pTmpParam); + } else { + if ((pTmpParam->pNext = (VParam*)calloc(1, sizeof(VParam))) == NULL) + goto CATCH; + + pTmpParam = pTmpParam->pNext; + memset(pTmpParam, 0x00, sizeof(VParam)); + VDATA_TRACE("pTmpParam : %p", pTmpParam); + } + + pTmpParam->parameter = param; + break; + } + case VMSG_PARAM_VALUE_STATUS: + dLen = 0; + numberedParam = 0; + switch (pTmpParam->parameter) { + case VMSG_PARAM_TYPE: + szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); + numberedParam |= __VMsgGetValue(szValue, pMsgTypeList, VMSG_TYPE_PARAM_NUM); break; - case VMSG_TYPE_VALUE_STATUS: - dLen = 0; - temp = __VMsgGetTypeVal(pMsgRaw, &status, &dLen, enc, pCurrent->pCur); + case VMSG_PARAM_VALUE: + szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); + numberedParam |= __VMsgGetValue(szValue, pMsgValueList, VMSG_VALUE_PARAM_NUM); + break; + case VMSG_PARAM_ENCODING: + szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); + numberedParam |= __VMsgGetValue(szValue, pMsgEncList, VMSG_ENCODE_PARAM_NUM); + enc = numberedParam; + break; + case VMSG_PARAM_CHARSET: + szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); + numberedParam |= __VMsgGetValue(szValue, pMsgCharsetList, VMSG_CHARSET_PARAM_NUM); + break; + case VMSG_PARAM_CONTEXT: + case VMSG_PARAM_LANGUAGE: + /* prevent 7605 08.03.13 */ + szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); + numberedParam = 0; + break; + default: + szValue = __VMsgGetParamVal(pMsgRaw, &status, &dLen); - if (valueCount < VDATA_VALUE_COUNT_MAX) { - pCurrent->pCur->pszValue[valueCount] = temp; - valueCount++; - pCurrent->pCur->valueCount = valueCount; - VDATA_TRACE("object property: %d, value: %s", pCurrent->pCur->property, pCurrent->pCur->pszValue[valueCount - 1]); - } else - VFREE(temp); + SET_PARAM_VALUE(numberedParam, szValue, pMsgTypeList, VMSG_TYPE_PARAM_NUM, pTmpParam, VMSG_PARAM_TYPE, enc); + SET_PARAM_VALUE(numberedParam, szValue, pMsgValueList, VMSG_VALUE_PARAM_NUM, pTmpParam, VMSG_PARAM_VALUE, enc); + SET_PARAM_VALUE(numberedParam, szValue, pMsgEncList, VMSG_ENCODE_PARAM_NUM, pTmpParam, VMSG_PARAM_ENCODING, enc); + SET_PARAM_VALUE(numberedParam, szValue, pMsgCharsetList, VMSG_CHARSET_PARAM_NUM, pTmpParam, VMSG_PARAM_CHARSET, enc); + numberedParam = 0; pMsgRaw += dLen; + dLen = 0; + break; + } + + VDATA_TRACE("%d, %s, %p", numberedParam, szValue, pTmpParam); + pTmpParam->paramValue = numberedParam; + pTmpParam->pNext = NULL; + VFREE(szValue); + pMsgRaw += dLen; + break; + case VMSG_TYPE_VALUE_STATUS: + dLen = 0; + temp = __VMsgGetTypeVal(pMsgRaw, &status, &dLen, enc, pCurrent->pCur); + + if (valueCount < VDATA_VALUE_COUNT_MAX) { + pCurrent->pCur->pszValue[valueCount] = temp; + valueCount++; + pCurrent->pCur->valueCount = valueCount; + VDATA_TRACE("object property: %d, value: %s", pCurrent->pCur->property, pCurrent->pCur->pszValue[valueCount - 1]); + } else + VFREE(temp); + + pMsgRaw += dLen; + break; } } VDATA_TRACE("pMsgRawTmp: %s", pMsgRawTmp); - //VFREE(pMsgRawTmp); + /* VFREE(pMsgRawTmp); */ if (pVMsg->pTop == NULL) { VDATA_TRACE("pVMsg->Top: NULL"); @@ -1065,7 +1061,7 @@ char* vmsg_encode(VTree *pVMsgRaw) char* pTemp = NULL; int len; int total = 0; - int cnt = 0; + int cnt = 0; for (; cnt < pVMsgRaw->pTop->valueCount; cnt++) { @@ -1082,34 +1078,34 @@ char* vmsg_encode(VTree *pVMsgRaw) while (true) { switch (pTmpTree->treeType) { - case VMESSAGE: - if (pVMsgRes) { - free(pVMsgRes); - pVMsgRes = NULL; - } + case VMESSAGE: + if (pVMsgRes) { + free(pVMsgRes); + pVMsgRes = NULL; + } - if ((pVMsgRes = (char *)calloc(1, sizeof(char) * (total += 13))) == NULL) { - VDATA_TRACE("vmsg_encode:calloc failed\n"); - VDATA_TRACE_END - return NULL; - } - memcpy(pVMsgRes, "BEGIN:VMSG\r\n", 13); - break; + if ((pVMsgRes = (char *)calloc(1, sizeof(char) * (total += 13))) == NULL) { + VDATA_TRACE("vmsg_encode:calloc failed\n"); + VDATA_TRACE_END + return NULL; + } + memcpy(pVMsgRes, "BEGIN:VMSG\r\n", 13); + break; - case VBODY: - if ((pTmpVMsgRes = (char *)realloc(pVMsgRes, sizeof(char) * (total += 14))) == NULL) { - VDATA_TRACE("vmsg_encode:realloc failed\n"); - VFREE(pVMsgRes); - VDATA_TRACE_END - return NULL; - } + case VBODY: + if ((pTmpVMsgRes = (char *)realloc(pVMsgRes, sizeof(char) * (total += 14))) == NULL) { + VDATA_TRACE("vmsg_encode:realloc failed\n"); + VFREE(pVMsgRes); + VDATA_TRACE_END + return NULL; + } - pVMsgRes = pTmpVMsgRes; - g_strlcat(pVMsgRes, "BEGIN:VBODY\r\n", 13); - break; + pVMsgRes = pTmpVMsgRes; + g_strlcat(pVMsgRes, "BEGIN:VBODY\r\n", 13); + break; - case VCARD: - break; + case VCARD: + break; } while (true) { @@ -1131,7 +1127,7 @@ char* vmsg_encode(VTree *pVMsgRaw) len = strlen(encoded); - if ((pTmpVMsgRes = (char*)realloc(pVMsgRes, (total += len+10))) == NULL) { + if ((pTmpVMsgRes = (char*)realloc(pVMsgRes, (total += len+10))) == NULL) { VDATA_TRACE("vmsg_encode():realloc failed\n"); VFREE(pTemp); VFREE(encoded); @@ -1172,22 +1168,22 @@ char* vmsg_encode(VTree *pVMsgRaw) } switch (pTmpTree->treeType) { - case VBODY: - if ((pTmpVMsgRes = (char *)realloc(pVMsgRes, (total += 12))) == NULL) { - VFREE(pVMsgRes); - VDATA_TRACE("vcal_encode():realloc failed\n"); - return NULL; - } + case VBODY: + if ((pTmpVMsgRes = (char *)realloc(pVMsgRes, (total += 12))) == NULL) { + VFREE(pVMsgRes); + VDATA_TRACE("vcal_encode():realloc failed\n"); + return NULL; + } - pVMsgRes = pTmpVMsgRes; - g_strlcat(pVMsgRes, "END:VBODY\r\n", 12); - break; + pVMsgRes = pTmpVMsgRes; + g_strlcat(pVMsgRes, "END:VBODY\r\n", 12); + break; - case VCARD: - break; + case VCARD: + break; - case VMESSAGE: - break; + case VMESSAGE: + break; } @@ -1226,14 +1222,14 @@ __VIsVmsgFile(char *pMsgRaw, int mode) char *pszVmsgBegin = "BEGIN:VMSG"; switch (mode) { - case CHECK_START: - for (i = 0; i < 10; i++) - if (*pszVmsgBegin++ != *pMsgRaw++) - rtnValue = false; - break; - - default: - rtnValue = false; + case CHECK_START: + for (i = 0; i < 10; i++) + if (*pszVmsgBegin++ != *pMsgRaw++) + rtnValue = false; + break; + + default: + rtnValue = false; } VDATA_TRACE_END return rtnValue; @@ -1301,7 +1297,7 @@ __VMsgTypeEncode(VObject *pTypeObj, char *pType) if (pTypeObj->pszValue[i] != NULL) len += strlen(pTypeObj->pszValue[i]); - } + } } else len += biLen; @@ -1459,29 +1455,29 @@ __VMsgParamEncode(VObject* pTypeObj, int* pEnc) /** Set Parameter Value name. */ switch (pTemp->parameter) { - case VMSG_PARAM_ENCODING: - *pEnc = pMsgEncList[pTemp->paramValue].flag; - shift = VMSG_ENCODE_PARAM_NUM; - pList = pMsgEncList; bSupported = true; - break; - case VMSG_PARAM_TYPE: - shift = VMSG_TYPE_PARAM_NUM; - pList = pMsgTypeList; bSupported = true; - break; - case VMSG_PARAM_VALUE: - shift = VMSG_VALUE_PARAM_NUM; - pList = pMsgValueList; bSupported = true; - break; - case VMSG_PARAM_CHARSET: - shift = VMSG_CHARSET_PARAM_NUM; - pList = pMsgCharsetList; bSupported = true; - break; - default: - if ((szParam = (char*)realloc(szParam, 5)) == NULL) { - VDATA_TRACE_END - return NULL; - } - g_strlcat(szParam, "NONE", strlen("NONE")); + case VMSG_PARAM_ENCODING: + *pEnc = pMsgEncList[pTemp->paramValue].flag; + shift = VMSG_ENCODE_PARAM_NUM; + pList = pMsgEncList; bSupported = true; + break; + case VMSG_PARAM_TYPE: + shift = VMSG_TYPE_PARAM_NUM; + pList = pMsgTypeList; bSupported = true; + break; + case VMSG_PARAM_VALUE: + shift = VMSG_VALUE_PARAM_NUM; + pList = pMsgValueList; bSupported = true; + break; + case VMSG_PARAM_CHARSET: + shift = VMSG_CHARSET_PARAM_NUM; + pList = pMsgCharsetList; bSupported = true; + break; + default: + if ((szParam = (char*)realloc(szParam, 5)) == NULL) { + VDATA_TRACE_END + return NULL; + } + g_strlcat(szParam, "NONE", strlen("NONE")); } /** exchage parameter value's to string.*/ diff --git a/vobject-engine/include/VCard.h b/vobject-engine/include/VCard.h index 88e9899..e0f29e8 100755 --- a/vobject-engine/include/VCard.h +++ b/vobject-engine/include/VCard.h @@ -31,8 +31,7 @@ extern "C" { * @enum vCardType * This enumeration defines the property of vcard. */ -typedef enum -{ +typedef enum { VCARD_TYPE_ADR, /**<This is address of vcard. */ VCARD_TYPE_AGENT, /**<This is agent of vcard. */ VCARD_TYPE_BDAY, /**<This is bday of vcard. */ @@ -67,7 +66,7 @@ typedef enum VCARD_TYPE_URL, /**<This is url of vcard. */ VCARD_TYPE_VERSION, /**<This is version of vcard. */ VCARD_TYPE_XIRMCLUID /**<This is xirmcl uid of vcard. */ -}vCardType; +} vCardType; #define VCARD_TYPE_NUM 34 /**< number of vcard type */ @@ -75,15 +74,14 @@ typedef enum * @enum vCardParamName * This enumeration defines the name of vcard parameter. */ -typedef enum -{ +typedef enum { VCARD_PARAM_CHARSET, /**<This is charset parameter. */ VCARD_PARAM_CONTEXT, /**<This is context parameter. */ VCARD_PARAM_ENCODING, /**<This is encoding parameter. */ VCARD_PARAM_LANGUAGE, /**<This is language parameter. */ VCARD_PARAM_TYPE, /**<This is type parameter. */ VCARD_PARAM_VALUE /**<This is value parameter. */ -}vCardParamName; +} vCardParamName; #define VCARD_PARAM_NUM 6 /**< number of vcard parameter */ @@ -91,14 +89,13 @@ typedef enum * @enum vCardParamName * This enumeration defines the value of encoding parameter. */ -typedef enum -{ +typedef enum { VCARD_ENC_PARAM_B, /**<This is b encoding parameter. */ VCARD_ENC_PARAM_BASE64, /**<This isbase64 encoding parameter. */ VCARD_ENC_PARAM_QUOTED_PRINTABLE, /**<This is quoted printable encoding parameter. */ VCARD_ENC_PARAM_7BIT, /**<This is 7 bit encoding parameter. */ VCARD_ENC_PARAM_8BIT /**<This is 8 bit encoding parameter. */ -}vCardEncVal; +} vCardEncVal; #define VCARD_ENCODE_PARAM_NUM 5 /**< number of vcard encoding parameter */ @@ -106,13 +103,12 @@ typedef enum * @enum vCardCharsetVal * This enumeration defines the value of charset parameter. */ -typedef enum -{ +typedef enum { VCARD_CHARSET_PARAM_UTF_8, /**<This is utf-8 charset parameter. */ VCARD_CHARSET_PARAM_UTF_16, /**<This is utf-16 charset parameter. */ VCARD_CHARSET_PARAM_SHIFT_JIS, /**<This is shift-jis charset parameter. */ VCARD_CHARSET_PARAM_ISO_8859_1 /**<This is iso-8859-1 charset parameter. */ -}vCardCharsetVal; +} vCardCharsetVal; #define VCARD_CHARSET_PARAM_NUM 4 /**< number of vcard charset parameter */ @@ -120,8 +116,7 @@ typedef enum * @enum vCardValVal * This enumeration defines the value of value parameter. */ -typedef enum -{ +typedef enum { VCARD_VALUE_PARAM_BINARY, /**<This is binary value parameter. */ VCARD_VALUE_PARAM_BOOLEAN, /**<This is boolean value parameter. */ VCARD_VALUE_PARAM_DATE, /**<This is date value parameter. */ @@ -135,7 +130,7 @@ typedef enum VCARD_VALUE_PARAM_URL, /**<This is url value parameter. */ VCARD_VALUE_PARAM_UTC_OFFSET, /**<This is utc offset value parameter. */ VCARD_VALUE_PARAM_VCARD /**<This is vcard value parameter. */ -}vCardValVal; +} vCardValVal; #define VCARD_VALUE_PARAM_NUM 13 /**< number of vcard value parameter */ @@ -143,8 +138,7 @@ typedef enum * @enum vCardValVal * This enumeration defines the value of type parameter. */ -typedef enum -{ +typedef enum { VCARD_TYPE_PARAM_AIFF, /**<This is aiff type parameter. */ VCARD_TYPE_PARAM_BBS, /**<This is bbs type parameter. */ VCARD_TYPE_PARAM_CAR, /**<This is car type parameter. */ @@ -175,7 +169,7 @@ typedef enum VCARD_TYPE_PARAM_ETC, /**<This is etc type parameter. */ VCARD_TYPE_PARAM_X400, /**<This is X400 type parameter. */ VCARD_TYPE_PARAM_X_IRMC_N /**<This is X-IRMC-N type parameter. */ -}vCardTypeVal; +} vCardTypeVal; #define VCARD_TYPE_PARAM_NUM 30 /**< number of vcard type parameter */ diff --git a/vobject-engine/include/VMessage.h b/vobject-engine/include/VMessage.h index 8a14bd4..322a25c 100755 --- a/vobject-engine/include/VMessage.h +++ b/vobject-engine/include/VMessage.h @@ -31,8 +31,7 @@ extern "C" { * @enum vMsgType * This enumeration defines the property of vcard. */ -typedef enum -{ +typedef enum { VMSG_TYPE_BEGIN, VMSG_TYPE_END, VMSG_TYPE_TEL, @@ -45,7 +44,7 @@ typedef enum VMSG_TYPE_STATUS, VMSG_TYPE_MSGTYPE, VMSG_TYPE_DATE, -}vMsgType; +} vMsgType; #define VMSG_TYPE_NUM 12 /**< number of vcard type */ @@ -53,15 +52,14 @@ typedef enum * @enum vMsgParamName * This enumeration defines the name of vcard parameter. */ -typedef enum -{ +typedef enum { VMSG_PARAM_CHARSET, /**<This is charset parameter. */ VMSG_PARAM_CONTEXT, /**<This is context parameter. */ VMSG_PARAM_ENCODING, /**<This is encoding parameter. */ VMSG_PARAM_LANGUAGE, /**<This is language parameter. */ VMSG_PARAM_TYPE, /**<This is type parameter. */ VMSG_PARAM_VALUE /**<This is value parameter. */ -}vMsgParamName; +} vMsgParamName; #define VMSG_PARAM_NUM 6 /**< number of vcard parameter */ @@ -69,14 +67,13 @@ typedef enum * @enum vMsgParamName * This enumeration defines the value of encoding parameter. */ -typedef enum -{ +typedef enum { VMSG_ENC_PARAM_B, /**<This is b encoding parameter. */ VMSG_ENC_PARAM_BASE64, /**<This isbase64 encoding parameter. */ VMSG_ENC_PARAM_QUOTED_PRINTABLE, /**<This is quoted printable encoding parameter. */ VMSG_ENC_PARAM_7BIT, /**<This is 7 bit encoding parameter. */ VMSG_ENC_PARAM_8BIT /**<This is 8 bit encoding parameter. */ -}vMsgEncVal; +} vMsgEncVal; #define VMSG_ENCODE_PARAM_NUM 5 /**< number of vcard encoding parameter */ @@ -84,13 +81,12 @@ typedef enum * @enum vMsgCharsetVal * This enumeration defines the value of charset parameter. */ -typedef enum -{ +typedef enum { VMSG_CHARSET_PARAM_UTF_8, /**<This is utf-8 charset parameter. */ VMSG_CHARSET_PARAM_UTF_16, /**<This is utf-16 charset parameter. */ VMSG_CHARSET_PARAM_SHIFT_JIS, /**<This is shift-jis charset parameter. */ VMSG_CHARSET_PARAM_ISO_8859_1 /**<This is iso-8859-1 charset parameter. */ -}vMsgCharsetVal; +} vMsgCharsetVal; #define VMSG_CHARSET_PARAM_NUM 4 /**< number of vcard charset parameter */ @@ -98,8 +94,7 @@ typedef enum * @enum vMsgValVal * This enumeration defines the value of value parameter. */ -typedef enum -{ +typedef enum { VMSG_VALUE_PARAM_BINARY, /**<This is binary value parameter. */ VMSG_VALUE_PARAM_BOOLEAN, /**<This is boolean value parameter. */ VMSG_VALUE_PARAM_DATE, /**<This is date value parameter. */ @@ -113,7 +108,7 @@ typedef enum VMSG_VALUE_PARAM_URL, /**<This is url value parameter. */ VMSG_VALUE_PARAM_UTC_OFFSET, /**<This is utc offset value parameter. */ VMSG_VALUE_PARAM_VMSG /**<This is vcard value parameter. */ -}vMsgValVal; +} vMsgValVal; #define VMSG_VALUE_PARAM_NUM 13 /**< number of vcard value parameter */ @@ -121,8 +116,7 @@ typedef enum * @enum vMsgValVal * This enumeration defines the value of type parameter. */ -typedef enum -{ +typedef enum { VMSG_TYPE_PARAM_AIFF, /**<This is aiff type parameter. */ VMSG_TYPE_PARAM_BBS, /**<This is bbs type parameter. */ VMSG_TYPE_PARAM_CAR, /**<This is car type parameter. */ @@ -153,7 +147,7 @@ typedef enum VMSG_TYPE_PARAM_ETC, /**<This is etc type parameter. */ VMSG_TYPE_PARAM_X400, /**<This is X400 type parameter. */ VMSG_TYPE_PARAM_X_IRMC_N /**<This is X-IRMC-N type parameter. */ -}vMsgTypeVal; +} vMsgTypeVal; #define VMSG_TYPE_PARAM_NUM 30 /**< number of vcard type parameter */ diff --git a/vobject-engine/include/VTypes.h b/vobject-engine/include/VTypes.h index aab1f18..73b86ca 100755 --- a/vobject-engine/include/VTypes.h +++ b/vobject-engine/include/VTypes.h @@ -27,7 +27,7 @@ #define LF 0x0a #define TAB 0x09 #define WSP 0x20 -#define UNKNOWN_NAME 0x80000000 +#define UNKNOWN_NAME 0x80000000 #define VCARD 0x01 #define VCALENDAR 0x02 @@ -68,23 +68,20 @@ typedef struct _VObject VObject; typedef struct _ValueObj ValueObj; typedef struct _VTree VTree; -struct _VTree -{ +struct _VTree { int treeType; VObject* pTop; VObject* pCur; VTree* pNext; }; -struct _VParam -{ +struct _VParam { int parameter; int paramValue; VParam* pNext; }; -struct _VObject -{ +struct _VObject { int property; VParam* pParam; int valueCount; @@ -97,8 +94,7 @@ struct _VObject char* pszGroupName; /* VDATA_GROUPNAME_SUPPORTED */ }; -struct _ValueObj -{ +struct _ValueObj { char* szName; int flag; }; diff --git a/vobject-engine/include/vobject.h b/vobject-engine/include/vobject.h index 1f867ac..59e1a8e 100755 --- a/vobject-engine/include/vobject.h +++ b/vobject-engine/include/vobject.h @@ -40,7 +40,7 @@ extern "C" { } while (0) -#define VDATA_TRACE_LINE() fprintf(stderr, "\n[calendarui] %s:%d\n", __FUNCTION__, __LINE__ ) +#define VDATA_TRACE_LINE() fprintf(stderr, "\n[calendarui] %s:%d\n", __FUNCTION__, __LINE__) #define SysRequireEx(expr, retValue) \ if (!(expr)) { \ |