17 #ifndef LOGGINGUTILS_HPP_
18 #define LOGGINGUTILS_HPP_
25 #include <boost/shared_array.hpp>
27 #include "kaa/gen/EndpointGen.hpp"
39 static std::string
toString(
const SyncRequest::notificationSyncRequest_t& request);
41 static std::string
toString(
const SyncRequest::configurationSyncRequest_t& request);
43 static std::string
toString(
const ProtocolVersionPair& protocolVersion);
45 static std::string
toString(
const SyncRequest::bootstrapSyncRequest_t& request);
47 static std::string
toString(
const SyncRequest::profileSyncRequest_t& request);
49 static std::string
toString(
const SyncRequest::syncRequestMetaData_t& request);
51 static std::string
toString(
const SyncRequest::eventSyncRequest_t& request);
53 static std::string
toString(
const UserSyncRequest::userAttachRequest_t& request);
55 static std::string
toString(
const SyncRequest::userSyncRequest_t& request);
57 static std::string
toString(
const SyncResponse::configurationSyncResponse_t& response);
59 static std::string
toString(
const SyncResponse::profileSyncResponse_t& response);
61 static std::string
toString(
const SyncResponse::bootstrapSyncResponse_t& response);
63 static std::string
toString(
const SyncResponse::eventSyncResponse_t& response);
65 static std::string
toString(
const SyncResponse::notificationSyncResponse_t& response);
67 static std::string
toString(
const UserSyncResponse::userAttachResponse_t& response);
69 static std::string
toString(
const UserSyncResponse::userDetachNotification_t& response);
71 static std::string
toString(
const SyncResponse::userSyncResponse_t& response);
73 static std::string
toString(
const SyncResponse::redirectSyncResponse_t& response);
77 static std::string
toString(
const std::vector<std::uint8_t>& vec) {
78 return toString(vec.data(), vec.size());
81 static std::string
toString(
const boost::shared_array<std::uint8_t>& vec, std::size_t length) {
86 return toString(buffer.first, buffer.second);
89 static std::string
toString(
const std::string& data) {
90 return toString(reinterpret_cast<const std::uint8_t*>(data.data()), data.length());
93 static std::string
toString(
const std::uint8_t* vec, std::size_t length);
95 static std::string
toString(SyncResponseStatus status);
97 static std::string
toString(
const NotificationSyncRequest::acceptedUnicastNotifications_t& notifications);
99 static std::string
toString(
const NotificationSyncRequest::topicStates_t& states);
101 static std::string
toString(
const NotificationSyncRequest::subscriptionCommands_t& commands);
103 static std::string
toString(SubscriptionCommandType type);
105 static std::string
toString(
const Notification& notification);
107 static std::string
toString(
const NotificationSyncResponse::notifications_t& notifications);
109 static std::string
toString(NotificationType type);
111 static std::string
toString(
const NotificationSyncResponse::availableTopics_t& topics);
113 static std::string
toString(SubscriptionType type);
115 static std::string
toString(
const UserSyncRequest::endpointAttachRequests_t& attachRequests);
117 static std::string
toString(
const UserSyncRequest::endpointDetachRequests_t& detachRequests);
119 static std::string
toString(
const UserSyncResponse::endpointAttachResponses_t& attachResponses);
121 static std::string
toString(
const UserSyncResponse::endpointDetachResponses_t& detachResponse);
123 static std::string
toString(SyncResponseResultType type);
125 static std::string
toString(
const EventSyncRequest::events_t& events);
127 static std::string
toString(
const EventSyncResponse::events_t& events);
129 static std::string
toString(
const EventSyncRequest::eventListenersRequests_t& request);
131 static std::string
toString(
const EventSyncResponse::eventListenersResponses_t& response);
133 static std::string
toString(
const EventSyncResponse::eventSequenceNumberResponse_t& response);
137 static std::string
toString(
const SyncRequest::logSyncRequest_t& logSyncRequest);
139 static std::string
toString(
const SyncResponse::logSyncResponse_t& logSyncResponse);
141 static std::string
toString(LogDeliveryErrorCode code);
154 static std::string
toString(
const std::vector<Event>& events);
static std::string toString(const std::vector< std::uint8_t > &vec)
static std::string toString(const std::string &data)
static std::string toString(const boost::shared_array< std::uint8_t > &vec, std::size_t length)
static std::string toString(const SharedDataBuffer &buffer)
static std::string toString(const SyncRequest::notificationSyncRequest_t &request)
std::pair< boost::shared_array< std::uint8_t >, std::uint32_t > SharedDataBuffer