Add socket path description 93/72393/8
authorOskar Świtalski <o.switalski@samsung.com>
Tue, 31 May 2016 14:36:52 +0000 (16:36 +0200)
committerOskar Świtalski <o.switalski@samsung.com>
Fri, 10 Jun 2016 10:25:14 +0000 (12:25 +0200)
Change-Id: I91769189f3034b10c1f9b5fe9725153f34c49013

src/common/CMakeLists.txt
src/common/config/Path.cpp [new file with mode: 0644]
src/common/config/Path.h [new file with mode: 0644]

index 45323ba..da7fe96 100644 (file)
@@ -40,6 +40,7 @@ SET(COMMON_SOURCES
     ${COMMON_PATH}/translator/Translator.cpp
     ${COMMON_PATH}/types/AgentErrorMsg.cpp
     ${COMMON_PATH}/util/SafeFunction.cpp
+    ${COMMON_PATH}/config/Path.cpp
     )
 
 ADD_DEFINITIONS("-fvisibility=default")
diff --git a/src/common/config/Path.cpp b/src/common/config/Path.cpp
new file mode 100644 (file)
index 0000000..434db09
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License
+ */
+/**
+ * @file        src/common/config/Path.h
+ * @author      Zofia Abramowska <z.abramowska@samsung.com>
+ * @brief       Definition of common types and consts
+ */
+
+
+#include "Path.h"
+
+namespace AskUser {
+namespace Path {
+
+const std::string &getSocketPath() {
+    static std::string socketPath = "/run/askuserd.socket";
+    return socketPath;
+}
+
+} // namespace Path
+} // namespace AskUser
diff --git a/src/common/config/Path.h b/src/common/config/Path.h
new file mode 100644 (file)
index 0000000..58e8371
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ *  Copyright (c) 2016 Samsung Electronics Co.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License
+ */
+/**
+ * @file        src/common/config/Path.h
+ * @author      Zofia Abramowska <z.abramowska@samsung.com>
+ * @brief       Definition of common types and consts
+ */
+
+#pragma once
+
+#include <string>
+
+namespace AskUser {
+namespace Path {
+
+const std::string &getSocketPath();
+
+} // namespace Path
+} // namespace AskUser