mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 23:58:17 +00:00
Add a getter to LinphoneVcard in order to access to the internal BelCard object
This commit is contained in:
parent
656ff43b13
commit
228e4a2f21
7 changed files with 25 additions and 2 deletions
|
|
@ -2013,7 +2013,7 @@ LinphoneCore *_linphone_core_new_with_config(LinphoneCoreCbs *cbs, struct _LpCon
|
|||
}
|
||||
|
||||
LinphoneCore *linphone_core_new_with_config(const LinphoneCoreVTable *vtable, struct _LpConfig *config, void *userdata) {
|
||||
LinphoneCoreCbs *cbs = linphone_factory_create_core_cbs(linphone_factory_get());;
|
||||
LinphoneCoreCbs *cbs = linphone_factory_create_core_cbs(linphone_factory_get());
|
||||
LinphoneCoreVTable *local_vtable = linphone_core_v_table_new();
|
||||
LinphoneCore *core = NULL;
|
||||
if (vtable != NULL) *local_vtable = *vtable;
|
||||
|
|
|
|||
|
|
@ -178,6 +178,10 @@ const char * linphone_vcard_as_vcard4_string(LinphoneVcard *vCard) {
|
|||
return vCard->belCard->toFoldedString().c_str();
|
||||
}
|
||||
|
||||
void *linphone_vcard_get_belcard(LinphoneVcard *vcard) {
|
||||
return &vcard->belCard;
|
||||
}
|
||||
|
||||
void linphone_vcard_set_full_name(LinphoneVcard *vCard, const char *name) {
|
||||
if (!vCard || !name) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,11 @@ extern "C" {
|
|||
*/
|
||||
LINPHONE_PUBLIC void linphone_chat_room_send_chat_message_2(LinphoneChatRoom *cr, LinphoneChatMessage *msg);
|
||||
|
||||
/**
|
||||
* Accessor for the shared_ptr<BelCard> stored by a #LinphoneVcard
|
||||
*/
|
||||
LINPHONE_PUBLIC void *linphone_vcard_get_belcard(LinphoneVcard *vcard);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -423,7 +423,8 @@ class CParser(object):
|
|||
'linphone_buffer_get_content',
|
||||
'linphone_chat_room_send_chat_message',
|
||||
'linphone_config_read_relative_file',
|
||||
'linphone_core_new_with_config']
|
||||
'linphone_core_new_with_config',
|
||||
'linphone_vcard_get_belcard']
|
||||
self.classBl = ['LinphoneImEncryptionEngine',
|
||||
'LinphoneImEncryptionEngineCbs',
|
||||
'LinphoneImNotifPolicy',
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@
|
|||
{{/internal}}
|
||||
{{/includes}}
|
||||
|
||||
{{#_class}}{{#isVcard}}
|
||||
#include <belcard/belcard.hpp>
|
||||
{{/isVcard}}{{/_class}}
|
||||
{{#_class}}{{#isfactory}}
|
||||
#include "config.hh"
|
||||
{{/isfactory}}{{/_class}}
|
||||
|
|
@ -50,6 +53,9 @@ namespace linphone {
|
|||
std::shared_ptr<Core> createCore(const std::shared_ptr<CoreListener> & cbs, const std::string & configPath, const std::string & factoryConfigPath) const;
|
||||
std::shared_ptr<Core> createCoreWithConfig(const std::shared_ptr<CoreListener> & cbs, const std::shared_ptr<Config> & config) const;
|
||||
{{/isfactory}}
|
||||
{{#isVcard}}
|
||||
std::shared_ptr<belcard::BelCard> &getVcard();
|
||||
{{/isVcard}}
|
||||
|
||||
{{#methods}}
|
||||
{{{prototype}}}
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@ std::shared_ptr<Core> Factory::createCoreWithConfig(const std::shared_ptr<CoreLi
|
|||
}
|
||||
{{/isfactory}}
|
||||
|
||||
{{#isVcard}}
|
||||
std::shared_ptr<belcard::BelCard> &Vcard::getVcard() {
|
||||
return *(shared_ptr<belcard::BelCard> *)linphone_vcard_get_belcard((LinphoneVcard *)mPrivPtr);
|
||||
}
|
||||
{{/isVcard}}
|
||||
|
||||
{{#methods}}
|
||||
{{{implPrototype}}} {
|
||||
{{{sourceCode}}}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ class CppTranslator(object):
|
|||
classDict['ismultilistenable'] = ismultilistenable
|
||||
classDict['isNotListener'] = True
|
||||
classDict['isfactory'] = (_class.name.to_c() == 'LinphoneFactory')
|
||||
classDict['isVcard'] = (_class.name.to_c() == 'LinphoneVcard')
|
||||
classDict['parentClassName'] = None
|
||||
classDict['className'] = CppTranslator.translate_class_name(_class.name)
|
||||
classDict['cClassName'] = '::' + _class.name.to_c()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue