2 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved
4 * Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef MMS_PLUGIN_USERAGENT_H
18 #define MMS_PLUGIN_USERAGENT_H
20 #include "MsgThread.h"
23 #include "MmsPluginTypes.h"
25 class MmsPluginUaManager: public MsgThread {
27 static MmsPluginUaManager *instance();
30 void addMmsReqEntity(mmsTranQEntity *req);
31 void getMmsPduData(mmsTranQEntity *qEntity);
32 bool processReceivedData(int msgId, char *pRcvdBody, int rcvdBodyLen, char *retrievedFilePath);
34 void lock() { mx.lock(); }
35 void unlock() { mx.unlock(); }
36 void wait() { cv.wait(mx.pMsgMutex()); }
37 void signal() { cv.signal(); }
41 ~MmsPluginUaManager();
43 static MmsPluginUaManager *pInstance;
49 MMS_NET_ERROR_T submitHandler(mmsTranQEntity *qEntity);
50 MMS_NET_ERROR_T waitingConf(mmsTranQEntity *qEntity);
52 /* condition values */
53 bool running; /* flag for thread running */
55 MsgSimpleQ<mmsTranQEntity> mmsTranQ; /* transaction q for mms plugin */
58 #endif /* MMS_PLUGIN_USERAGENT_H */