2 * Copyright 2012-2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://floralicense.org/license/
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #include "MsgCppTypes.h"
19 #include "MsgException.h"
20 #include "SmsPluginEventHandler.h"
21 #include "SmsPluginWapPushHandler.h"
22 #include "SmsPluginConcatHandler.h"
23 #include "SmsPluginTransport.h"
24 #include "SmsPluginUAManager.h"
27 /*==================================================================================================
28 IMPLEMENTATION OF SmsPluginUAManager - Member Functions
29 ==================================================================================================*/
30 SmsPluginUAManager* SmsPluginUAManager::pInstance = NULL;
33 SmsPluginUAManager::SmsPluginUAManager() : mx(), cv()
39 SmsPluginUAManager::~SmsPluginUAManager()
45 SmsPluginUAManager* SmsPluginUAManager::instance()
48 pInstance = new SmsPluginUAManager();
54 void SmsPluginUAManager::run()
61 SMS_REQUEST_INFO_S request;
62 smsTranQ.front(&request);
66 SmsPluginTransport::instance()->submitRequest(&request);
68 catch (MsgException& e)
70 MSG_FATAL("%s", e.what());
77 MSG_FATAL("%s", e.what());
88 void SmsPluginUAManager::addReqEntity(SMS_REQUEST_INFO_S *request)
90 SMS_REQUEST_INFO_S reqTmp = {0,};
92 memcpy(&reqTmp, request, sizeof(SMS_REQUEST_INFO_S));
93 smsTranQ.push_back(reqTmp);