Commit 9aa350c4 authored by François Grisez's avatar François Grisez

C++ wrapper: add a method on each class in order to get the associated C object pointer

parent 10055ddd
......@@ -37,6 +37,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
{{/isfactory}}{{/_class}}
{{#_class}}
{{#isNotListener}}
struct {{{privCClassName}}};
{{/isNotListener}}
{{/_class}}
namespace linphone {
{{#priorDeclarations}}
......@@ -68,6 +75,7 @@ namespace linphone {
LINPHONECXX_PUBLIC ~{{{className}}}();
LINPHONECXX_PUBLIC const void *c_struct() const {return mPrivPtr;}
{{/isnotrefcountable}}
LINPHONECXX_PUBLIC {{{privCClassName}}} *cPtr() {return ({{{privCClassName}}} *)mPrivPtr;}
{{/isNotListener}}
{{#ismonolistenable}}
......
......@@ -85,6 +85,7 @@ class CppTranslator(object):
'isVcard' : (_class.name.to_c() == 'LinphoneVcard'),
'className' : CppTranslator.translate_class_name(_class.name),
'cClassName' : '::' + _class.name.to_c(),
'privCClassName' : '_' + _class.name.to_c(),
'parentClassName' : 'Object' if _class.refcountable else None,
'methods' : [],
'staticMethods' : [],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment