Beta merge 2
[profile/ivi/wrt-plugins-tizen.git] / src / platform / API / Application / ApplicationService.cpp
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17
18 /**
19  * @file        ApplicationService.cpp
20  * @author      Youngkyeong Yun (yk.yun@samsung.com)
21  * @version     0.1
22  */
23
24
25 #include "ApplicationService.h"
26
27 namespace TizenApis {
28 namespace Api {
29 namespace Application {
30
31 ApplicationService::ApplicationService() :
32         m_service(NULL)
33 {
34     LogDebug("entered");
35         //m_serviceDataArray = ApplicationServiceDataPtr(new ApplicationServiceData);
36 }
37
38 ApplicationService::ApplicationService(const std::string &op, const std::string &uri, const std::string &mime, std::vector<ApplicationServiceDataPtr> &dataArray) :
39         m_service(NULL)
40 {
41     LogDebug("entered");
42         m_operation = op;
43         m_uri = uri;
44         m_mime = mime;
45         m_serviceDataArray = dataArray;
46 }
47
48 ApplicationService::~ApplicationService()
49 {
50     //nothing to do in destructor
51     LogDebug("entered");
52 }
53
54 std::string ApplicationService::getOperation() const
55 {
56         return m_operation;
57 }
58
59 void ApplicationService::setOperation(const std::string &operation)
60 {
61         m_operation = operation;
62 }
63
64 std::string ApplicationService::getUri() const
65 {
66         return m_uri;
67 }
68
69 void ApplicationService::setUri(const std::string &uri)
70 {
71         m_uri = uri;
72 }
73
74 std::string ApplicationService::getMime() const
75 {
76         return m_mime;
77 }
78
79 void ApplicationService::setMime(const std::string &mime)
80 {
81         m_mime = mime;
82 }
83
84 std::vector<ApplicationServiceDataPtr> ApplicationService::getServiceDataArray() const
85 {
86         return m_serviceDataArray;
87 }
88
89 void ApplicationService::setServiceDataArray(std::vector<ApplicationServiceDataPtr> &dataArray)
90 {
91         m_serviceDataArray = dataArray;
92 }
93
94 void ApplicationService::addServiceData(const ApplicationServiceDataPtr &data)
95 {
96         m_serviceDataArray.push_back(data);
97         
98 }
99
100 service_h ApplicationService::getService_h() const
101 {
102         return m_service;
103 }
104 void ApplicationService::setService_h(const service_h service)
105 {
106         m_service = service;
107 }
108
109 }
110 }
111 }