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
28 static MmsPluginUaManager *instance();
31 void addMmsReqEntity(mmsTranQEntity req);
32 void getMmsPduData(mmsTranQEntity *qEntity);
33 bool processReceivedData(int msgId, char *pRcvdBody, int rcvdBodyLen, char *retrievedFilePath);
35 void lock(){ mx.lock(); }
36 void unlock(){ mx.unlock(); }
37 void wait(){ cv.wait(mx.pMutex()); }
38 void signal(){ cv.signal(); }
42 ~MmsPluginUaManager();
44 static MmsPluginUaManager *pInstance;
50 MMS_NET_ERROR_T submitHandler(mmsTranQEntity *qEntity);
51 MMS_NET_ERROR_T waitingConf(mmsTranQEntity *qEntity);
54 bool running; // flag for thread running
56 MsgSimpleQ<mmsTranQEntity> mmsTranQ; // transaction q for mms plugin
59 #endif //MMS_PLUGIN_USERAGENT_H