Update change log and spec for wrt-plugins-tizen_0.4.9
[platform/framework/web/wrt-plugins-tizen.git] / src / Application / ApplicationControl.h
1 //
2 // Tizen Web Device API
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 // http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 #ifndef TIZENAPIS_API_APPLICATION_CONTROL_H_
19 #define TIZENAPIS_API_APPLICATION_CONTROL_H_
20
21 #include <string>
22 #include <vector>
23 #include <dpl/log/log.h>
24 #include <dpl/shared_ptr.h>
25 #include <app_service.h>
26 #include "ApplicationControlData.h"
27
28 namespace DeviceAPI {
29 namespace Application {
30
31 class ApplicationControl;
32 typedef DPL::SharedPtr<ApplicationControl> ApplicationControlPtr;
33
34 /* This object represents a single extra data for service request and reply */
35 class ApplicationControl
36 {
37   public:
38     ApplicationControl();
39         ApplicationControl(const std::string &op, const std::string &uri, const std::string &mime,
40                         const std::string &category, std::vector<ApplicationControlDataPtr> &dataArray) ;
41     ~ApplicationControl();
42
43         std::string getOperation() const;
44         void setOperation(const std::string &operation);
45
46         std::string getUri() const;
47         void setUri(const std::string &uri);
48
49         std::string getMime() const;
50         void setMime(const std::string &uri);
51
52         std::string getCategory() const;
53         void setCategory(const std::string &category);
54
55         std::vector<ApplicationControlDataPtr> getAppControlDataArray() const;
56         void setAppControlDataArray(const std::vector<ApplicationControlDataPtr> &dataArray);
57         void addAppControlData(const ApplicationControlDataPtr &data);
58
59         service_h getService_h() const;
60         void setService_h(const service_h service);  
61
62 #if 0
63         void replyResult(std::vector<ApplicationControlDataPtr> &appControlDataArray);
64         void replyFailure();
65 #endif
66
67   private:
68         std::string m_operation;
69         std::string m_uri;
70         std::string m_mime;
71         std::string m_category;
72         std::vector<ApplicationControlDataPtr> m_appControlDataArray;
73         service_h m_appControl;
74 };
75 }
76 }
77 #endif