C++11 library providing functionality common to all adapters.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

35 lines
1.4 KiB

// This file is under GNU General Public License 3.0
// see LICENSE.txt
#ifndef LIBPEPADAPTER_UTILS_HH
#define LIBPEPADAPTER_UTILS_HH
#include "pEpLog.hh"
#include <pEp/message.h>
#include <pEp/identity_list.h>
#include <pEp/group.h>
#include <exception>
#include <vector>
#include <string>
namespace pEp {
namespace Utils {
// C-types to C++ types
std::vector<::pEp_identity *> to_cxx(const ::identity_list &idl);
// pEpEngine datatypes to string
std::string to_string(const ::pEp_identity *const ident, bool full = true, int indent = 0);
std::string to_string(const ::bloblist_t *const ident, bool full = true, int indent = 0);
std::string to_string(const ::stringpair_list_t *const spl, bool full = true, int indent = 0);
std::string to_string(const ::message *const msg, bool full = true, int indent = 0);
std::string to_string(const ::identity_list *const idl, bool full = true, int indent = 0);
std::string to_string(const ::pEp_member *const member, bool full = true, int indent = 0);
std::string to_string(const ::member_list *const mbl, bool full = true, int indent = 0);
std::string to_string(const ::pEp_group *const group, bool full = true, int indent = 0);
// Misc
std::string readKey(); // TODO: Move to std_utils
} // namespace Utils
} // namespace pEp
#endif // LIBPEPADAPTER_UTILS_HH