DPL: changing namespace of imported classes to SecurityManager 65/23165/5
authorRafal Krypa <r.krypa@samsung.com>
Wed, 18 Jun 2014 14:08:22 +0000 (16:08 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Tue, 24 Jun 2014 11:18:04 +0000 (13:18 +0200)
DPL code uses DPL namespace, moving it to SecurityManager.

Change-Id: I89f1c6c8b965085546064856045145c9c6d0ac3a
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
12 files changed:
src/server/dpl/core/include/dpl/availability.h
src/server/dpl/core/include/dpl/char_traits.h
src/server/dpl/core/include/dpl/errno_string.h
src/server/dpl/core/include/dpl/free_deleter.h
src/server/dpl/core/include/dpl/fstream_accessors.h
src/server/dpl/core/include/dpl/string.h
src/server/dpl/core/src/errno_string.cpp
src/server/dpl/core/src/string.cpp
src/server/dpl/db/include/dpl/db/naive_synchronization_object.h
src/server/dpl/db/include/dpl/db/sql_connection.h
src/server/dpl/db/src/naive_synchronization_object.cpp
src/server/dpl/db/src/sql_connection.cpp

index 0813892..5892953 100644 (file)
  * @author      Jihoon Chung (jihoon.chung@samsung.com)
  * @version     1.0
  */
-#ifndef DPL_AVAILABILITY_H
-#define DPL_AVAILABILITY_H
+#ifndef SECURITY_MANAGER_AVAILABILITY_H
+#define SECURITY_MANAGER_AVAILABILITY_H
 
-#define DPL_DEPRECATED __attribute__((deprecated))
-#define DPL_DEPRECATED_WITH_MESSAGE(msg) __attribute__((deprecated(msg)))
+#define SECURITY_MANAGER_DEPRECATED __attribute__((deprecated))
+#define SECURITY_MANAGER_DEPRECATED_WITH_MESSAGE(msg) __attribute__((deprecated(msg)))
 
-#define DPL_UNUSED __attribute__((unused))
-#define DPL_UNUSED_PARAM(variable) (void)variable
+#define SECURITY_MANAGER_UNUSED __attribute__((unused))
+#define SECURITY_MANAGER_UNUSED_PARAM(variable) (void)variable
 
-#endif // DPL_AVAILABILITY_H
+#endif // SECURITY_MANAGER_AVAILABILITY_H
index eb2988f..8c173e8 100644 (file)
@@ -22,8 +22,8 @@
  *              Current char traits could be extended in feature to boost
  * performance
  */
-#ifndef DPL_CHAR_TRAITS
-#define DPL_CHAR_TRAITS
+#ifndef SECURITY_MANAGER_CHAR_TRAITS
+#define SECURITY_MANAGER_CHAR_TRAITS
 
 #include <cstring>
 #include <string>
@@ -31,8 +31,8 @@
 #include <algorithm>
 #include <dpl/exception.h>
 
-namespace DPL {
+namespace SecurityManager {
 typedef std::char_traits<wchar_t> CharTraits;
-} // namespace DPL
+} // namespace SecurityManager
 
-#endif // DPL_CHAR_TRAITS
+#endif // SECURITY_MANAGER_CHAR_TRAITS
index 446dbc9..ebf0274 100644 (file)
  * @version     1.0
  * @brief       This file is the implementation file of errno string
  */
-#ifndef DPL_ERRNO_STRING_H
-#define DPL_ERRNO_STRING_H
+#ifndef SECURITY_MANAGER_ERRNO_STRING_H
+#define SECURITY_MANAGER_ERRNO_STRING_H
 
 #include <dpl/exception.h>
 #include <string>
 #include <cerrno>
 
-namespace DPL {
-DECLARE_EXCEPTION_TYPE(DPL::Exception, InvalidErrnoValue)
+namespace SecurityManager {
+DECLARE_EXCEPTION_TYPE(SecurityManager::Exception, InvalidErrnoValue)
 
 std::string GetErrnoString(int error = errno);
-} // namespace DPL
+} // namespace SecurityManager
 
-#endif // DPL_ERRNO_STRING_H
+#endif // SECURITY_MANAGER_ERRNO_STRING_H
index 4a09904..80b835f 100644 (file)
 #define FREE_DELETER_H
 
 #include <cstdlib>
-namespace DPL
+namespace SecurityManager
 {
 struct free_deleter
 {
     void operator()(void *p) { std::free(p); }
 };
-}// DPL
+}// SecurityManager
 #endif // FREE_DELETER_H
index 5d6379a..09f2dc2 100644 (file)
@@ -25,7 +25,7 @@
 #ifndef SECURITY_MANAGER_FSTREAM_ACCESSORS_H
 #define SECURITY_MANAGER_FSTREAM_ACCESSORS_H
 
-namespace DPL {
+namespace SecurityManager {
 
 /*
  * Bypass lack of public member function to get file
@@ -43,6 +43,6 @@ public:
     }
 };
 
-} // namespace DPL
+} // namespace SecurityManager
 
 #endif // SECURITY_MANAGER_FSTREAM_ACCESSORS_H
index e4dc923..168c000 100644 (file)
@@ -18,8 +18,8 @@
  * @author      Piotr Marcinkiewicz (p.marcinkiew@samsung.com)
  * @version     1.0
  */
-#ifndef DPL_STRING
-#define DPL_STRING
+#ifndef SECURITY_MANAGER_STRING
+#define SECURITY_MANAGER_STRING
 
 #include <dpl/exception.h>
 #include <dpl/char_traits.h>
@@ -27,7 +27,7 @@
 #include <ostream>
 #include <numeric>
 
-namespace DPL {
+namespace SecurityManager {
 // @brief DPL string
 typedef std::basic_string<wchar_t, CharTraits> String;
 
@@ -35,7 +35,7 @@ typedef std::basic_string<wchar_t, CharTraits> String;
 class StringException
 {
   public:
-    DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
+    DECLARE_EXCEPTION_TYPE(SecurityManager::Exception, Base)
 
     // @brief Invalid init for UTF8 to UTF32 converter
     DECLARE_EXCEPTION_TYPE(Base, IconvInitErrorUTF8ToUTF32)
@@ -56,10 +56,10 @@ class StringException
     DECLARE_EXCEPTION_TYPE(Base, ICUInvalidCharacterFound)
 };
 
-//!\brief convert ASCII string to DPL::String
+//!\brief convert ASCII string to SecurityManager::String
 String FromASCIIString(const std::string& aString);
 
-//!\brief convert UTF32 string to DPL::String
+//!\brief convert UTF32 string to SecurityManager::String
 String FromUTF32String(const std::wstring& aString);
 
 //@brief Returns String object created from UTF8 string
@@ -150,8 +150,8 @@ template<class StringType> void Trim(StringType & obj, typename StringType::cons
 }
 
 
-} //namespace DPL
+} //namespace SecurityManager
 
-std::ostream& operator<<(std::ostream& aStream, const DPL::String& aString);
+std::ostream& operator<<(std::ostream& aStream, const SecurityManager::String& aString);
 
-#endif // DPL_STRING
+#endif // SECURITY_MANAGER_STRING
index 6c59776..b5de431 100644 (file)
@@ -33,7 +33,7 @@
 #include <cerrno>
 #include <stdexcept>
 
-namespace DPL {
+namespace SecurityManager {
 namespace // anonymous
 {
 const size_t DEFAULT_ERRNO_STRING_SIZE = 32;
@@ -96,4 +96,4 @@ std::string GetErrnoString(int error)
         }
     }
 }
-} // namespace DPL
+} // namespace SecurityManager
index a642eaa..718fb06 100644 (file)
@@ -35,7 +35,7 @@
 #include <unicode/ustring.h>
 
 // TODO: Completely move to ICU
-namespace DPL {
+namespace SecurityManager {
 namespace //anonymous
 {
 class ASCIIValidator
@@ -122,7 +122,7 @@ String FromUTF8String(const std::string& aIn)
     return &output[1];
 }
 
-std::string ToUTF8String(const DPL::String& aIn)
+std::string ToUTF8String(const SecurityManager::String& aIn)
 {
     if (aIn.empty()) {
         return std::string();
@@ -242,9 +242,9 @@ int StringCompare(const String &left,
         return static_cast<int>(u_strcmp(leftICU.get(), rightICU.get()));
     }
 }
-} //namespace DPL
+} //namespace SecurityManager
 
-std::ostream& operator<<(std::ostream& aStream, const DPL::String& aString)
+std::ostream& operator<<(std::ostream& aStream, const SecurityManager::String& aString)
 {
-    return aStream << DPL::ToUTF8String(aString);
+    return aStream << SecurityManager::ToUTF8String(aString);
 }
index 2f63a0f..ad4192f 100644 (file)
  * @brief       This file is the implementation file of SQL naive
  * synchronization object
  */
-#ifndef DPL_NAIVE_SYNCHRONIZATION_OBJECT_H
-#define DPL_NAIVE_SYNCHRONIZATION_OBJECT_H
+#ifndef SECURITY_MANAGER_NAIVE_SYNCHRONIZATION_OBJECT_H
+#define SECURITY_MANAGER_NAIVE_SYNCHRONIZATION_OBJECT_H
 
 #include <dpl/db/sql_connection.h>
 
-namespace DPL {
+namespace SecurityManager {
 namespace DB {
 /**
  * Naive synchronization object used to synchronize SQL connection
@@ -40,6 +40,6 @@ class NaiveSynchronizationObject :
     virtual void NotifyAll();
 };
 } // namespace DB
-} // namespace DPL
+} // namespace SecurityManager
 
-#endif // DPL_NAIVE_SYNCHRONIZATION_OBJECT_H
+#endif // SECURITY_MANAGER_NAIVE_SYNCHRONIZATION_OBJECT_H
index 6bd6cf9..373ad7f 100644 (file)
@@ -19,8 +19,8 @@
  * @version     1.0
  * @brief       This file is the implementation file of SQL connection
  */
-#ifndef DPL_SQL_CONNECTION_H
-#define DPL_SQL_CONNECTION_H
+#ifndef SECURITY_MANAGER_SQL_CONNECTION_H
+#define SECURITY_MANAGER_SQL_CONNECTION_H
 
 #include <dpl/noncopyable.h>
 #include <dpl/exception.h>
@@ -35,7 +35,7 @@
 #include <memory>
 #include <stdint.h>
 
-namespace DPL {
+namespace SecurityManager {
 namespace DB {
 /**
  * SQL connection class
@@ -49,7 +49,7 @@ class SqlConnection
     class Exception
     {
       public:
-        DECLARE_EXCEPTION_TYPE(DPL::Exception, Base)
+        DECLARE_EXCEPTION_TYPE(SecurityManager::Exception, Base)
         DECLARE_EXCEPTION_TYPE(Base, SyntaxError)
         DECLARE_EXCEPTION_TYPE(Base, ConnectionBroken)
         DECLARE_EXCEPTION_TYPE(Base, InternalError)
@@ -506,6 +506,6 @@ class SqlConnection
     RowID GetLastInsertRowID() const;
 };
 } // namespace DB
-} // namespace DPL
+} // namespace SecurityManager
 
-#endif // DPL_SQL_CONNECTION_H
+#endif // SECURITY_MANAGER_SQL_CONNECTION_H
index 63f1dd7..a96897f 100644 (file)
@@ -69,7 +69,7 @@ void MiliSleep(uint64_t miliseconds)
 }
 }
 
-namespace DPL {
+namespace SecurityManager {
 namespace DB {
 void NaiveSynchronizationObject::Synchronize()
 {
@@ -82,4 +82,4 @@ void NaiveSynchronizationObject::NotifyAll()
     // No need to inform about anything
 }
 } // namespace DB
-} // namespace DPL
+} // namespace SecurityManager
index 57ea9b9..fdb4fe4 100644 (file)
@@ -31,7 +31,7 @@
 #include <cstdio>
 #include <cstdarg>
 
-namespace DPL {
+namespace SecurityManager {
 namespace DB {
 namespace // anonymous
 {
@@ -863,4 +863,4 @@ SqlConnection::AllocDefaultSynchronizationObject()
     return new NaiveSynchronizationObject();
 }
 } // namespace DB
-} // namespace DPL
+} // namespace SecurityManager