|
@ -1,5 +1,6 @@ |
|
|
#pragma once |
|
|
#pragma once |
|
|
|
|
|
|
|
|
|
|
|
#include <boost/python.hpp> |
|
|
#include <pEp/pEpEngine.h> |
|
|
#include <pEp/pEpEngine.h> |
|
|
#include <string> |
|
|
#include <string> |
|
|
#include "str_attr.hh" |
|
|
#include "str_attr.hh" |
|
@ -7,39 +8,40 @@ |
|
|
namespace pEp { |
|
|
namespace pEp { |
|
|
namespace PythonAdapter { |
|
|
namespace PythonAdapter { |
|
|
using namespace utility; |
|
|
using namespace utility; |
|
|
|
|
|
using namespace boost::python; |
|
|
|
|
|
|
|
|
class Identity { |
|
|
class Identity { |
|
|
pEp_identity *_ident; |
|
|
pEp_identity *_ident; |
|
|
|
|
|
|
|
|
public: |
|
|
public: |
|
|
Identity(); |
|
|
Identity(); |
|
|
Identity(Identity& second); |
|
|
Identity(const Identity& second); |
|
|
~Identity(); |
|
|
~Identity(); |
|
|
operator pEp_identity *(); |
|
|
operator pEp_identity *(); |
|
|
|
|
|
|
|
|
void address(string value) { str_attr(_ident->address, value); } |
|
|
void set_address(string value) { str_attr(_ident->address, value); } |
|
|
string address() { return str_attr(_ident->address); } |
|
|
string get_address() { return str_attr(_ident->address); } |
|
|
|
|
|
|
|
|
void fpr(string value) { str_attr(_ident->fpr, value); } |
|
|
void set_fpr(string value) { str_attr(_ident->fpr, value); } |
|
|
string fpr() { return str_attr(_ident->fpr); } |
|
|
string get_fpr() { return str_attr(_ident->fpr); } |
|
|
|
|
|
|
|
|
void user_id(string value) { str_attr(_ident->user_id, value); } |
|
|
void set_user_id(string value) { str_attr(_ident->user_id, value); } |
|
|
string user_id() { return str_attr(_ident->user_id); } |
|
|
string get_user_id() { return str_attr(_ident->user_id); } |
|
|
|
|
|
|
|
|
void username(string value) { str_attr(_ident->username, value); } |
|
|
void set_username(string value) { str_attr(_ident->username, value); } |
|
|
string username() { return str_attr(_ident->username); } |
|
|
string get_username() { return str_attr(_ident->username); } |
|
|
|
|
|
|
|
|
void comm_type(PEP_comm_type value) { _ident->comm_type = value; }; |
|
|
void set_comm_type(PEP_comm_type value) { _ident->comm_type = value; }; |
|
|
PEP_comm_type comm_type() { return _ident->comm_type; } |
|
|
PEP_comm_type get_comm_type() { return _ident->comm_type; } |
|
|
|
|
|
|
|
|
void lang(std::string value); |
|
|
void set_lang(std::string value); |
|
|
std::string lang(); |
|
|
std::string get_lang(); |
|
|
|
|
|
|
|
|
void me(bool value) { _ident->me = value; } |
|
|
void set_me(bool value) { _ident->me = value; } |
|
|
bool me() { return _ident->me; } |
|
|
bool get_me() { return _ident->me; } |
|
|
|
|
|
|
|
|
void me(identity_flags_t flags) { _ident->flags = flags; } |
|
|
void set_flags(identity_flags_t flags) { _ident->flags = flags; } |
|
|
identity_flags_t flags() { return _ident->flags; } |
|
|
identity_flags_t get_flags() { return _ident->flags; } |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|