Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ipc-method-result-builder.hpp
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Contact: Jan Olszak (j.olszak@samsung.com)
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License
17 */
18 
26 #ifndef COMMON_RESULT_IPC_METHOD_RESULT_BUILDER_HPP
27 #define COMMON_RESULT_IPC_METHOD_RESULT_BUILDER_HPP
28 
29 #include "config.hpp"
30 
33 
34 #include <memory>
35 
36 namespace vasum {
37 namespace api {
38 
39 const std::string IPC_CONNECTION_PREFIX = "ipc://";
40 
42 public:
43  explicit IPCMethodResultBuilder(const cargo::ipc::MethodResult::Pointer& methodResult);
45 
46 private:
47  void setImpl(const std::shared_ptr<void>& data) override;
48  void setVoid() override;
49  void setError(const std::string& name, const std::string& message) override;
50  std::string getID() const override;
51 
53 };
54 
55 
56 } // namespace result
57 } // namespace vasum
58 
59 #endif // COMMON_RESULT_IPC_METHOD_RESULT_BUILDER_HPP
std::shared_ptr< MethodResult > Pointer
Definition: method-result.hpp:47
Configuration file for the code.
void setImpl(const std::shared_ptr< void > &data) override
Definition: ipc-method-result-builder.cpp:35
An interface used to set a result to a method call.
Definition: method-result-builder.hpp:39
std::string getID() const override
Definition: ipc-method-result-builder.cpp:51
IPCMethodResultBuilder(const cargo::ipc::MethodResult::Pointer &methodResult)
Definition: ipc-method-result-builder.cpp:30
char data[368]
Definition: initctl.cpp:41
const std::string IPC_CONNECTION_PREFIX
Definition: ipc-method-result-builder.hpp:39
Class for sending the result of a method.
Definition: ipc-method-result-builder.hpp:41
~IPCMethodResultBuilder()
Definition: ipc-method-result-builder.hpp:44
void setError(const std::string &name, const std::string &message) override
Definition: ipc-method-result-builder.cpp:45
cargo::ipc::MethodResult::Pointer mMethodResultPtr
Definition: ipc-method-result-builder.hpp:52
void setVoid() override
Definition: ipc-method-result-builder.cpp:40
Interface for result builders.