Change default fvisibility to hidden 44/161744/3
authorSungbae Yoo <sungbae.yoo@samsung.com>
Mon, 27 Nov 2017 08:23:42 +0000 (17:23 +0900)
committerJaemin Ryu <jm77.ryu@samsung.com>
Wed, 29 Nov 2017 00:39:19 +0000 (09:39 +0900)
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Change-Id: I49581e81def9d2d80883a4e7d0a25282100a1c58

49 files changed:
CMakeLists.txt
include/klay/audit/audit-trail.h
include/klay/audit/console-sink.h
include/klay/audit/dlog-sink.h
include/klay/audit/logger-core.h
include/klay/audit/logger.h
include/klay/audit/logsink.h
include/klay/audit/null-sink.h
include/klay/auth/group.h
include/klay/auth/user.h
include/klay/cgroup.h
include/klay/db/column.h
include/klay/db/connection.h
include/klay/db/statement.h
include/klay/dbus/connection.h
include/klay/dbus/error.h
include/klay/dbus/introspection.h
include/klay/dbus/signal.h
include/klay/dbus/variant.h
include/klay/error.h
include/klay/eventfd.h
include/klay/exception.h
include/klay/file-descriptor.h
include/klay/file-user.h
include/klay/filesystem.h
include/klay/gmainloop.h
include/klay/klay.h [new file with mode: 0644]
include/klay/latch.h
include/klay/mainloop.h
include/klay/namespace.h
include/klay/netlink/audit-rule.h
include/klay/netlink/audit.h
include/klay/netlink/netlink.h
include/klay/process.h
include/klay/reflection.h
include/klay/rmi/client.h
include/klay/rmi/connection.h
include/klay/rmi/message-composer.h
include/klay/rmi/message.h
include/klay/rmi/notification.h
include/klay/rmi/service.h
include/klay/rmi/socket.h
include/klay/serialize.h
include/klay/testbench.h
include/klay/thread-pool.h
include/klay/xml/document.h
include/klay/xml/keepblanks.h
include/klay/xml/node.h
include/klay/xml/parser.h

index 36c5dc56ee09ddc923deaaf205ded2540c6e4a7f..fccbd8642e554e1ab97e7b0009365f2b0b4ec8f1 100755 (executable)
@@ -42,7 +42,7 @@ EXECUTE_PROCESS(COMMAND getconf LFS_CFLAGS OUTPUT_VARIABLE LFS_CFLAGS OUTPUT_STR
 EXECUTE_PROCESS(COMMAND getconf LFS_LDFLAGS OUTPUT_VARIABLE LFS_LDFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
 EXECUTE_PROCESS(COMMAND getconf LFS_LIBS OUTPUT_VARIABLE LFS_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
 
-SET(COMPILE_BASE_FLAGS         "-g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive ${LFS_CFLAGS}")
+SET(COMPILE_BASE_FLAGS         "-g -fPIC -Werror -Wall -Wl,--as-needed -Wl,--no-whole-archive -fvisibility=hidden -fvisibility-inlines-hidden ${LFS_CFLAGS}")
 
 SET(CMAKE_C_FLAGS_PROFILING    "${COMPILE_BASE_FLAGS} -O0 -pg")
 SET(CMAKE_CXX_FLAGS_PROFILING  "${COMPILE_BASE_FLAGS} -O0 -pg -std=${CXX_STD} -fno-rtti")
index 0b25c75ab4287eb71a61fa004723fcc7078d304b..dcfd2985476bc04f91229c0f818f216f2ce86c53 100644 (file)
@@ -17,6 +17,8 @@
 #ifndef __AUDIT_TRAIL_H__
 #define __AUDIT_TRAIL_H__
 
+#include <klay/klay.h>
+
 #include <thread>
 #include <string>
 
@@ -24,7 +26,7 @@
 
 namespace audit {
 
-class AuditTrail {
+class KLAY_EXPORT AuditTrail {
 public:
        AuditTrail();
        ~AuditTrail();
index 85dbe2737d14215b4021f70bad1c0463055c63fb..a57db777bf909197346b17a5cf01b4fcc914a243 100644 (file)
@@ -23,7 +23,7 @@
 
 namespace audit {
 
-class ConsoleLogSink : public LogSink {
+class KLAY_EXPORT ConsoleLogSink : public LogSink {
 public:
        void sink(const std::string& message) override;
 };
index cff29f24c564b9b0e2cabd99ae8d4dad36effebb..3313100e5da270c6d1f10d5e94b07377994faa98 100644 (file)
@@ -23,7 +23,7 @@
 
 namespace audit {
 
-class DlogLogSink : public LogSink {
+class KLAY_EXPORT DlogLogSink : public LogSink {
 public:
        explicit DlogLogSink(const std::string& tag);
        void sink(const std::string& message) override;
index 2cca42cf28fee62ed3c95b41eb6f86533daac78c..ae28d3e14f2847b86617157ccea9bd239c11da5f 100644 (file)
@@ -25,7 +25,7 @@
 
 namespace audit {
 
-class LoggerCore {
+class KLAY_EXPORT LoggerCore {
 public:
        LoggerCore();
        virtual ~LoggerCore() = default;
index 739cfaf2b2eb8d8fd3a1c11ec42dc5daa731ed15..5282be58c79c7f727282d60621232dd5107812a2 100644 (file)
@@ -27,7 +27,7 @@
 
 namespace audit {
 
-enum class LogLevel : int {
+enum class KLAY_EXPORT LogLevel : int {
        Silent,
        Error,
        Warning,
@@ -36,7 +36,7 @@ enum class LogLevel : int {
        Trace
 };
 
-struct LogRecord {
+struct KLAY_EXPORT LogRecord {
        LogLevel severity;
        std::string file;
        unsigned int line;
@@ -44,13 +44,13 @@ struct LogRecord {
        std::string message;
 };
 
-class Logger {
+class KLAY_EXPORT Logger {
 public:
        static void log(LogSink* logSink, const LogRecord record);
 };
 
-std::string LogLevelToString(const LogLevel level);
-LogLevel StringToLogLevel(const std::string& level);
+KLAY_EXPORT std::string LogLevelToString(const LogLevel level);
+KLAY_EXPORT LogLevel StringToLogLevel(const std::string& level);
 
 #ifndef __FILENAME__
 #define __FILENAME__                                                  \
index f1949dfda031eaf8f9654cf358ea3d697640f9be..83f1915513be286f061a8b9f3eff3c4f8cefa7e7 100644 (file)
 #ifndef __AUDIT_LOGSINK_H__
 #define __AUDIT_LOGSINK_H__
 
+#include <klay/klay.h>
+
 #include <string>
 
 namespace audit {
 
-class LogSink {
+class KLAY_EXPORT LogSink {
 public:
        LogSink() {}
        virtual ~LogSink() {}
index cd5d9dc9ab2c8d4c0efc6184b2e2ac81b9eb59e7..74297988329990259c5fdd2b7a465a5ac97bcc7c 100644 (file)
@@ -23,7 +23,7 @@
 
 namespace audit {
 
-class NullLogSink : public LogSink {
+class KLAY_EXPORT NullLogSink : public LogSink {
 public:
        void sink(const std::string& message) override;
 };
index 5c0b583c1546b0861291e13861949db64545d795..625862a47225bb6898e521f0ef4c9f4b317ceefb 100644 (file)
 
 #include <string>
 
+#include <klay/klay.h>
+
 #ifndef INVALID_GID
 #define INVALID_GID             UINT_MAX
 #endif
 
 namespace runtime {
 
-class Group final {
+class KLAY_EXPORT Group final {
 public:
        Group(const std::string& name);
        Group(const gid_t group);
index 88aa5b034997fa5193617fe601553392a31d0660..a5130d936366c5f8cb18d6b741f79ad83d1a060e 100644 (file)
 
 #include <string>
 
+#include <klay/klay.h>
+
 #ifndef INVALID_UID
 #define INVALID_UID             UINT_MAX
 #endif
 
 namespace runtime  {
 
-class User final {
+class KLAY_EXPORT User final {
 public:
        User(const std::string& name);
        User(const uid_t user);
index a9cb217a1bca7ecb78673f51fd3b644c81183cd7..1b41d455c8f086b39a04a2a2a7193079505dd5a9 100644 (file)
 #include <string>
 #include <vector>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class Cgroup final {
+class KLAY_EXPORT Cgroup final {
 public:
        Cgroup() = delete;
 
index 5a566e86b6993c7ff8bea40da6a6fae2ae51982e..2b033d4fa7ac9714c3a4f7a8acd1c21e450245e0 100644 (file)
 
 #include <string>
 
+#include <klay/klay.h>
 #include <klay/db/statement.h>
 
 namespace database {
 
-class Column {
+class KLAY_EXPORT Column {
 public:
        Column(const Statement& stmt, int idx);
        virtual ~Column() noexcept;
index 3f2eaa54a3a6b3a6112b4d9d6cc044347c4ba2cf..641310bed20e286fcefe21b6ea11956784c9b2fc 100644 (file)
 
 #include <string>
 
+#include <klay/klay.h>
+
 namespace database {
 
-class Connection {
+class KLAY_EXPORT Connection {
 public:
        enum Mode {
                Create = SQLITE_OPEN_CREATE,
index 6c11ceff596deadaf2c06cab5a3b7e84227da09c..286de8b2ea3f7eaac23ff43b69d38f11a43668ce 100644 (file)
 #include <map>
 #include <string>
 
+#include <klay/klay.h>
+
 namespace database {
 
 class Column;
 class Connection;
 
-class Statement {
+class KLAY_EXPORT Statement {
 public:
        Statement(const Connection& db, const std::string& query);
        virtual ~Statement();
index 9f1b1f97ccfa7e619a361c834265909a3939aec2..283d63d77e4a5e6acba5b7a5c37e317beb982c5d 100644 (file)
 #include <functional>
 #include <map>
 
+#include <klay/klay.h>
 #include <klay/dbus/variant.h>
 
 namespace dbus {
 
-class Connection {
+class KLAY_EXPORT Connection {
 public:
        typedef unsigned int NameId;
        typedef unsigned int ObjectId;
index ed98df96e6eff6705d3c14f8edc4081a2521be30..a72cfafb46f49783974e13cbc128238551e079be 100644 (file)
 
 #include <gio/gio.h>
 
+#include <klay/klay.h>
+
 namespace dbus {
 
-class Error {
+class KLAY_EXPORT Error {
 public:
        Error();
        ~Error();
index 711611e276e12da4cc489e720777bb68b4babd9b..775cb5da45b0b6069f3c32c739a936317709caf4 100644 (file)
@@ -23,6 +23,8 @@
 #include <vector>
 #include <utility>
 
+#include <klay/klay.h>
+
 namespace dbus {
 
 using BusNode = GDBusNodeInfo*;
@@ -33,7 +35,7 @@ using Property = GDBusPropertyInfo*;
 
 using XmlProperties = std::vector<std::pair<std::string, std::string>>;
 
-class Introspection {
+class KLAY_EXPORT Introspection {
 public:
        explicit Introspection(const std::string &xmlData);
        virtual ~Introspection(void);
index 441579512b04cd7e2d9767bd1b096b71cb8646b9..9573b8bdb757de4f45f4c85b93466035c4748c84 100644 (file)
 #ifndef __RUNTIME_DBUS_SIGNAL_H__
 #define __RUNTIME_DBUS_SIGNAL_H__
 
+
 #include <string>
 #include <utility>
 
+#include <klay/klay.h>
 #include <klay/dbus/connection.h>
 
 namespace dbus {
@@ -27,7 +29,7 @@ namespace signal {
 
 using SignalCallback = dbus::Connection::SignalCallback;
 
-class Sender {
+class KLAY_EXPORT Sender {
 public:
        explicit Sender(const std::string &objectPath, const std::string &interfaceName);
        virtual ~Sender(void) = default;
@@ -50,7 +52,7 @@ private:
        std::string interfaceName;
 };
 
-class Receiver {
+class KLAY_EXPORT Receiver {
 public:
        explicit Receiver(const std::string &objectPath, const std::string &interfaceName);
        virtual ~Receiver(void) = default;
index 5d0b193efc208a6d891d73e94f74e9b752540fac..cd81660ec9ec686d6110fb2bc624796fbfad011c 100644 (file)
 
 #include <string>
 
+#include <klay/klay.h>
+
 namespace dbus {
 
-class Variant {
+class KLAY_EXPORT Variant {
 public:
        Variant();
        Variant(GVariant* var);
@@ -40,7 +42,7 @@ private:
        GVariant* variant;
 };
 
-class VariantIterator {
+class KLAY_EXPORT VariantIterator {
 public:
        VariantIterator(GVariantIter* it);
        VariantIterator(VariantIterator&& it);
index f746c38dd99e8dd8da16d71c4448bfc4d889c277..d9ec20dd5e4032baf857d99cfcc6e00030680817 100644 (file)
 
 #include <string>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class Error {
+class KLAY_EXPORT Error {
 public:
        static std::string message();
        static std::string message(int errorCode);
        static int lastErrorCode();
 };
 
-std::string GetSystemErrorMessage();
-std::string GetSystemErrorMessage(int errorCode);
+KLAY_EXPORT std::string GetSystemErrorMessage();
+KLAY_EXPORT std::string GetSystemErrorMessage(int errorCode);
 
 } // namespace runtime
 #endif //__RUNTIME_ERROR_H__
index a6421365b07f717eb9b3acf3d7a430890035227f..e2560eebee20cd27e5300f4d59dcd3524cff9814 100644 (file)
 
 #include <sys/eventfd.h>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class EventFD {
+class KLAY_EXPORT EventFD {
 public:
        EventFD(unsigned int initval = 0, int flags = EFD_SEMAPHORE | EFD_CLOEXEC);
        ~EventFD();
index 81eee69ac040ecf93bec3829971e4f98de79f283..c91ea9621d0901f71ce9fa1948cc891421252071 100644 (file)
 #include <stdexcept>
 #include <string>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class Exception: public std::runtime_error {
+class KLAY_EXPORT Exception: public std::runtime_error {
 public:
        Exception(const std::string& error) :
                std::runtime_error(error)
@@ -34,13 +36,13 @@ public:
        virtual const char *className() const;
 };
 
-#define EXCEPTION_DEFINE(CLS)             \
-       class CLS : public Exception {        \
-       public:                               \
-               CLS(const std::string& error);    \
-               ~CLS() {}                         \
-               const char *className() const;    \
-               const char *name() const;         \
+#define EXCEPTION_DEFINE(CLS)                 \
+       class KLAY_EXPORT CLS : public Exception {   \
+       public:                                   \
+               CLS(const std::string& error);        \
+               ~CLS() {}                             \
+               const char *className() const;        \
+               const char *name() const;             \
        };
 
 
index 902e7c6f35ac6da664e1fe7f7507fcdebce8f037..9991d7dcdefeb94a3a5cd16d6ca5036d69ca53cc 100644 (file)
 #ifndef __RUNTIME_FILE_DESCRIPTOR_H__
 #define __RUNTIME_FILE_DESCRIPTOR_H__
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-struct FileDescriptor {
+struct KLAY_EXPORT FileDescriptor {
        FileDescriptor(int fd = -1, bool autoclose = false) :
                fileDescriptor(fd), autoClose(autoclose)
        {
index 81d3a39f878ea2c68cba23747a967d4a43a09621..c57d9d0bc3911cfaf0201eafad108804afbb3f22 100644 (file)
 #include <string>
 #include <vector>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class FileUser final {
+class KLAY_EXPORT FileUser final {
 public:
        FileUser() = delete;
 
index 3c62f048f42657e57686e35abbe87ba7850a842a..68c23e657e04013d001c46d07aa4b7d17ac985d1 100644 (file)
 
 #include <string>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class File {
+class KLAY_EXPORT File {
 public:
        File() :
                descriptor(-1)
@@ -129,7 +131,7 @@ private:
        std::string path;
 };
 
-class DirectoryIterator {
+class KLAY_EXPORT DirectoryIterator {
 public:
        DirectoryIterator() :
            directoryHandle(nullptr)
@@ -182,7 +184,7 @@ private:
        std::string basename;
 };
 
-class Mount final {
+class KLAY_EXPORT Mount final {
 public:
        Mount() = delete;
 
index a01bba3ce8f4e9d78c6523cec2e3f6c1f0d26e6a..e3743d4c20c1be3ea0d811f3aebb4da178ccb723 100644 (file)
  */
 #ifndef __GMAINLOOP_WRAPPER_H__
 #define __GMAINLOOP_WRAPPER_H__
+
 #include <thread>
 #include <memory>
 #include <glib.h>
 
-class ScopedGMainLoop {
+#include <klay/klay.h>
+
+class KLAY_EXPORT ScopedGMainLoop {
 public:
        ScopedGMainLoop() :
                mainloop(g_main_loop_new(NULL, FALSE), g_main_loop_unref)
diff --git a/include/klay/klay.h b/include/klay/klay.h
new file mode 100644 (file)
index 0000000..42169a5
--- /dev/null
@@ -0,0 +1,24 @@
+/*
+ *  Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  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
+ */
+
+#ifndef __KLAY_H__
+#define __KLAY_H__
+
+#ifndef KLAY_EXPORT
+#define KLAY_EXPORT __attribute__((visibility("default")))
+#endif // KLAY_EXPORT
+
+#endif //__KLAY_H__
index c95280b11499427b4cfe835955b131eb9697fc7a..363871e169e3d62b62063843159f8e1a41f08e09 100644 (file)
 #include <mutex>
 #include <condition_variable>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class Latch {
+class KLAY_EXPORT Latch {
 public:
        Latch() :
                count(0)
index 3c3f55dfb17dfe9c084d3a43f16fa4cdde1f6f93..662020fb3f271a5adb1a9d1ffd88afb5c53299ca 100644 (file)
 #include <mutex>
 #include <atomic>
 
+#include <klay/klay.h>
+
 #include "eventfd.h"
 
 namespace runtime {
 
-class Mainloop {
+class KLAY_EXPORT Mainloop {
 public:
        typedef unsigned int Event;
        typedef std::function<void(int fd, Event event)> Callback;
index 1a1a60e99b8d2b9a055be75fde2e09b2a20db920..c8a52c954ec2ac8affd095e08401fb417d423d0e 100644 (file)
 
 #include <sched.h>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class Namespace final {
+class KLAY_EXPORT Namespace final {
 public:
        Namespace() = delete;
 
index 16faaad7f646bb557530f96078c178ca3154bbab..b595fd29b4d74a06a9b2c976c7319c58963e4d9b 100644 (file)
 
 #include <linux/audit.h>
 
+#include <klay/klay.h>
+
 namespace netlink {
 
-class AuditRule final {
+class KLAY_EXPORT AuditRule final {
 public:
        AuditRule();
        AuditRule(std::vector<char>& buf);
index 5098d23ce2f3b871c247ffd6a760caf78cd59abb..b523b23b7579143e731754a8c458b1e443569554 100644 (file)
 
 #include <linux/audit.h>
 
+#include <klay/klay.h>
 #include <klay/mainloop.h>
 #include <klay/netlink/netlink.h>
 #include <klay/netlink/audit-rule.h>
 
 namespace netlink {
 
-class Audit final {
+class KLAY_EXPORT Audit final {
 public:
        typedef std::pair<int, std::vector<char>> Message;
        typedef std::function<void(Message&)> MessageHandler;
index 0e12e11e37cbbe6a8ac9a593e7ede86101d2ba24..9fdc648d43dc2db80dca2ff4269c937863a38577 100644 (file)
 
 #include <linux/netlink.h>
 
+#include <klay/klay.h>
+
 #ifndef NETLINK_AUDIT
 #define NETLINK_AUDIT 9
 #endif
 
 namespace netlink {
 
-class Netlink final {
+class KLAY_EXPORT Netlink final {
 public:
        Netlink(int);
        Netlink(Netlink&&);
index 9b629a29591cc35be0253c73d2b8a54f2fdc7cb8..87575ed74ba2f71931676c597875d764568fc02b 100644 (file)
 #include <string>
 #include <vector>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class Process {
+class KLAY_EXPORT Process {
 public:
        typedef pid_t Pid;
 
index acac17742e0f0269675d0eec6b424ce556ffac4d..eb96c4867d2dc15741f1ce28dc1a980d63ed8359 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <type_traits>
 
+#include <klay/klay.h>
 #include <klay/preprocessor.h>
 
 #define VISIT_ELEMENT(elem) v.visit(#elem, elem)
@@ -40,7 +41,7 @@ void accept(V v) const                              \
        static void accept(V) {}
 
 template<typename T>
-struct ReflectionTraitChecker {
+struct KLAY_EXPORT ReflectionTraitChecker {
        struct Visitor {};
 
        template <typename C> static std::true_type
@@ -53,6 +54,6 @@ struct ReflectionTraitChecker {
 };
 
 template<typename T>
-struct IsReflectable : public std::integral_constant<bool, ReflectionTraitChecker<T>::value> {};
+struct KLAY_EXPORT IsReflectable : public std::integral_constant<bool, ReflectionTraitChecker<T>::value> {};
 
 #endif //!__RUNTIME_REFLECTION_H__
index d0c81e60873e11685f93c1ad4fc27b33496f9758..2af2d316e901a7d6e1c6b58af7462795c597ee1d 100644 (file)
@@ -22,6 +22,7 @@
 #include <memory>
 #include <iostream>
 
+#include <klay/klay.h>
 #include <klay/mainloop.h>
 #include <klay/rmi/message.h>
 #include <klay/rmi/connection.h>
@@ -30,7 +31,7 @@
 namespace rmi {
 
 template <typename ExceptionModel>
-class RemoteAccessClient {
+class KLAY_EXPORT RemoteAccessClient {
 public:
        RemoteAccessClient(const std::string& address);
        virtual ~RemoteAccessClient();
@@ -176,7 +177,7 @@ Type RemoteAccessClient<ExceptionModel>::methodCall(const std::string& method, A
        return response;
 }
 
-class DefaultExceptionModel {
+class KLAY_EXPORT DefaultExceptionModel {
 public:
        void raise(const std::string& target, const std::string& except);
 };
index af73a77cd3c2580c78278f00cb347e18ec0a183a..27a87bc15fcc34728c3f9d38314df1c43984005c 100644 (file)
 #include <mutex>
 #include <string>
 
+#include <klay/klay.h>
 #include <klay/rmi/socket.h>
 #include <klay/rmi/message.h>
 
 namespace rmi {
 
-class Connection {
+class KLAY_EXPORT Connection {
 public:
        Connection(Socket&& sock);
        Connection(const Connection&) = delete;
index b5279b20dde49b249b299437da55220a39f5e729..41d366add8184f9152dc5ab211b1861bae27e867 100644 (file)
 
 #include <cstddef>
 
+#include <klay/klay.h>
+
 namespace rmi {
 
-class MessageComposer {
+class KLAY_EXPORT MessageComposer {
 public:
        MessageComposer(size_t caps = 4096);
        MessageComposer(const MessageComposer& rhs);
index 7ac0208d33da1d025d2ab67fd3049bff27abc9f4..e8afdd7b3e887105d99e26cc64456ef2682e299f 100644 (file)
 #include <memory>
 #include <atomic>
 
+#include <klay/klay.h>
 #include <klay/serialize.h>
 #include <klay/file-descriptor.h>
 #include <klay/rmi/message-composer.h>
 
 namespace rmi {
 
-class Message {
+class KLAY_EXPORT Message {
 public:
        enum Type {
                Invalid,
index adf5bf954916cefc36fecfd8c166943a1d4e65b4..a48e108916b59ea6a47d5ae3fb8d1f4569f6ee9c 100644 (file)
@@ -25,6 +25,7 @@
 #include <utility>
 #include <unordered_map>
 
+#include <klay/klay.h>
 #include <klay/rmi/socket.h>
 #include <klay/rmi/message.h>
 #include <klay/audit/logger.h>
@@ -33,7 +34,7 @@ namespace rmi {
 
 typedef std::pair<int, int> SubscriptionId;
 
-class Notification {
+class KLAY_EXPORT Notification {
 public:
        Notification();
        Notification(const std::string& name);
index 2cd75f0fab6d695c9a4a1b0162d088bf41d6f58b..b5158f79b56c84d83bd27efa2c0288ea3e1df6c0 100644 (file)
@@ -26,6 +26,7 @@
 #include <functional>
 #include <unordered_map>
 
+#include <klay/klay.h>
 #include <klay/mainloop.h>
 #include <klay/thread-pool.h>
 #include <klay/preprocessor.h>
@@ -145,7 +146,7 @@ typedef std::function<bool(const Connection& connection)> ConnectionCallback;
 typedef std::function<bool(const Credentials& cred, const std::string& privilege)> PrivilegeChecker;
 typedef std::function<void(const Credentials& cred, const std::string& method, int condition)> AuditTrail;
 
-class Service {
+class KLAY_EXPORT Service {
 public:
        Service(const std::string& address);
        virtual ~Service();
index a2220167ca7f25a72a85d788e5cc040bbeafcccd..76b18728ec88064a980308142b4bb5a2e0834e15 100644 (file)
 #ifndef __RMI_SOCKET_H__
 #define __RMI_SOCKET_H__
 
+#include <klay/klay.h>
 #include <klay/exception.h>
 
 namespace rmi {
 
-class SocketException: public runtime::Exception {
+class KLAY_EXPORT SocketException: public runtime::Exception {
 public:
        SocketException(const std::string& msg) : runtime::Exception(msg) {}
 };
 
-struct Credentials {
+struct KLAY_EXPORT Credentials {
        pid_t pid;
        uid_t uid;
        gid_t gid;
        std::string security;
 };
 
-class Socket {
+class KLAY_EXPORT Socket {
 public:
        explicit Socket(int socketFd = -1, bool autoclose = true);
        Socket(Socket&& socket) noexcept;
index 461882c854162fe20b4cd5609a33c6c67f9a35f0..0fccf1bae811f6db28197a894bd00a840fc8f4c5 100644 (file)
 #include <string>
 #include <utility>
 
+#include <klay/klay.h>
 #include <klay/reflection.h>
 
 namespace runtime {
 
 template<typename T>
-struct SerializableArgument {
+struct KLAY_EXPORT SerializableArgument {
        SerializableArgument(const T& arg) :
                value(arg)
        {
@@ -37,7 +38,7 @@ struct SerializableArgument {
 };
 
 template<typename T>
-struct DeserializableArgument {
+struct KLAY_EXPORT DeserializableArgument {
        DeserializableArgument(T& arg) :
                value(arg)
        {
@@ -48,7 +49,7 @@ struct DeserializableArgument {
 };
 
 template<class StorageType>
-class Serializer {
+class KLAY_EXPORT Serializer {
 public:
        Serializer(StorageType& source) :
                storage(source)
@@ -94,7 +95,7 @@ private:
 };
 
 template<class StorageType>
-class Deserializer {
+class KLAY_EXPORT Deserializer {
 public:
        Deserializer(StorageType& source) :
                storage(source)
index 1fd6841de6bf2d86f6e811e325adc4195af3c446..a31a61672817564d11b2b0cb604136933a5c5830 100644 (file)
@@ -14,8 +14,8 @@
  *  limitations under the License
  */
 
-#ifndef __DPM_TESTBENCH_H__
-#define __DPM_TESTBENCH_H__
+#ifndef __KLAY_TESTBENCH_H__
+#define __KLAY_TESTBENCH_H__
 
 #include <cstring>
 
 #include <memory>
 #include <sstream>
 
+#include <klay/klay.h>
+
 namespace testbench {
 
-struct Source {
+struct KLAY_EXPORT Source {
        Source(const std::string& file, long line, const std::string& msg);
 
        std::string fileName;
@@ -34,7 +36,7 @@ struct Source {
        std::string     message;
 };
 
-class TestResult {
+class KLAY_EXPORT TestResult {
 public:
        TestResult();
        virtual ~TestResult();
@@ -46,7 +48,7 @@ private:
        int     __failureCount;
 };
 
-class TestSuite {
+class KLAY_EXPORT TestSuite {
 public:
        TestSuite(const std::string& name);
        virtual ~TestSuite();
@@ -94,7 +96,7 @@ private:
        TestCaseRegistry __registry;
 };
 
-class Testbench {
+class KLAY_EXPORT Testbench {
 public:
        static void addTestSuite(TestSuite *testSuite);
        static void runAllTestSuites();
@@ -160,4 +162,4 @@ void TestName##TestCase::standalone()
        return;                                             \
 }
 } // namespace testbench
-#endif //!__DPM_TESTBENCH_H__
+#endif //!__KLAY_TESTBENCH_H__
index e00e4cf3f64da64c1b71bc3830319c77f7bd8a26..a0da0247dd97389ac3936c80fa89b748b5b69d90 100644 (file)
 #include <vector>
 #include <deque>
 
+#include <klay/klay.h>
+
 namespace runtime {
 
-class ThreadPool {
+class KLAY_EXPORT ThreadPool {
 public:
        ThreadPool(size_t threads);
        ~ThreadPool();
index 6704a33ca1a6b29e06ed17ff3b39c607181a7fac..ed6af71e253c53212f325b630d096d7d509db3e4 100644 (file)
 
 #include <string>
 
+#include <klay/klay.h>
 #include <klay/xml/node.h>
 
 namespace xml {
 
-class Document {
+class KLAY_EXPORT Document {
 public:
        Document(const std::string& root, const std::string& version = XML_DEFAULT_VERSION);
        Document(xmlDoc* doc);
index 7d5c2f4720c55f64b67df56d1c515c76d436792c..13dff451a1296b218881288adfdb2705abea4ef2 100644 (file)
 
 #include <libxml/globals.h>
 
+#include <klay/klay.h>
+
 namespace xml {
 
-class KeepBlanks {
+class KLAY_EXPORT KeepBlanks {
 public:
        KeepBlanks(bool value);
        ~KeepBlanks();
index 4a0e5aedb2cb681a6e10e547e969acdc92f645a1..09ece09fe3fd3f9643c4e4a0885bb2f6d64d43ab 100644 (file)
 #include <libxml/tree.h>
 #include <libxml/parser.h>
 
+#include <klay/klay.h>
+
 namespace xml {
 
-class Node {
+class KLAY_EXPORT Node {
 public:
        typedef std::vector<Node> NodeList;
 
index b0823863ec02cafbf725c753b20b77449e3168b4..bce6ca5c3d049de980cbc0841b0ec9e16da58da8 100644 (file)
 
 #include <string>
 
+#include <klay/klay.h>
 #include <klay/xml/document.h>
 
 namespace xml {
 
-class Parser {
+class KLAY_EXPORT Parser {
 public:
        static Document* parseFile(const std::string& filename, bool validate = false);
        static Document* parseString(const std::string& xml, bool validate = false);