libpEpAdapter/src/utils.hh

35 lines
1.4 KiB
C++
Raw Normal View History

// 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>
2021-04-29 02:11:44 +02:00
#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();
} // namespace Utils
} // namespace pEp
#endif // LIBPEPADAPTER_UTILS_HH