DPL code uses DPL namespace, moving it to SecurityManager.
Change-Id: I89f1c6c8b965085546064856045145c9c6d0ac3a
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
* @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
* 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>
#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
* @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
#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
#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
}
};
-} // namespace DPL
+} // namespace SecurityManager
#endif // SECURITY_MANAGER_FSTREAM_ACCESSORS_H
* @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>
#include <ostream>
#include <numeric>
-namespace DPL {
+namespace SecurityManager {
// @brief DPL string
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)
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
}
-} //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
#include <cerrno>
#include <stdexcept>
-namespace DPL {
+namespace SecurityManager {
namespace // anonymous
{
const size_t DEFAULT_ERRNO_STRING_SIZE = 32;
}
}
}
-} // namespace DPL
+} // namespace SecurityManager
#include <unicode/ustring.h>
// TODO: Completely move to ICU
-namespace DPL {
+namespace SecurityManager {
namespace //anonymous
{
class ASCIIValidator
return &output[1];
}
-std::string ToUTF8String(const DPL::String& aIn)
+std::string ToUTF8String(const SecurityManager::String& aIn)
{
if (aIn.empty()) {
return std::string();
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);
}
* @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
virtual void NotifyAll();
};
} // namespace DB
-} // namespace DPL
+} // namespace SecurityManager
-#endif // DPL_NAIVE_SYNCHRONIZATION_OBJECT_H
+#endif // SECURITY_MANAGER_NAIVE_SYNCHRONIZATION_OBJECT_H
* @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>
#include <memory>
#include <stdint.h>
-namespace DPL {
+namespace SecurityManager {
namespace DB {
/**
* SQL connection class
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)
RowID GetLastInsertRowID() const;
};
} // namespace DB
-} // namespace DPL
+} // namespace SecurityManager
-#endif // DPL_SQL_CONNECTION_H
+#endif // SECURITY_MANAGER_SQL_CONNECTION_H
}
}
-namespace DPL {
+namespace SecurityManager {
namespace DB {
void NaiveSynchronizationObject::Synchronize()
{
// No need to inform about anything
}
} // namespace DB
-} // namespace DPL
+} // namespace SecurityManager
#include <cstdio>
#include <cstdarg>
-namespace DPL {
+namespace SecurityManager {
namespace DB {
namespace // anonymous
{
return new NaiveSynchronizationObject();
}
} // namespace DB
-} // namespace DPL
+} // namespace SecurityManager