Store the dbus connection while launching the service
[platform/core/context/context-service.git] / src / agent / legacy / Request.cpp
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd.
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 #include <glib.h>
18 #include <Types.h>
19 #include "Request.h"
20
21 ctx::RequestInfo::RequestInfo(int type, int reqId, const char* subj, const char* desc) :
22         __type(type),
23         __reqId(reqId),
24         __subject(subj),
25         __description(desc)
26 {
27 }
28
29 ctx::RequestInfo::~RequestInfo()
30 {
31 }
32
33 int ctx::RequestInfo::getType()
34 {
35         return __type;
36 }
37
38 int ctx::RequestInfo::getId()
39 {
40         return __reqId;
41 }
42
43 const ctx::Credentials* ctx::RequestInfo::getCredentials()
44 {
45         return NULL;
46 }
47
48 const char* ctx::RequestInfo::getPackageId()
49 {
50         return NULL;
51 }
52
53 const char* ctx::RequestInfo::getClient()
54 {
55         return NULL;
56 }
57
58 const char* ctx::RequestInfo::getSubject()
59 {
60         return __subject.c_str();
61 }
62
63 ctx::CtxJson1& ctx::RequestInfo::getDescription()
64 {
65         return __description;
66 }