diff --git a/wrappers/cpp/class_header.mustache b/wrappers/cpp/class_header.mustache index 6e4e94876..b81329836 100644 --- a/wrappers/cpp/class_header.mustache +++ b/wrappers/cpp/class_header.mustache @@ -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}} diff --git a/wrappers/cpp/genwrapper.py b/wrappers/cpp/genwrapper.py index c7b42f591..45773addd 100755 --- a/wrappers/cpp/genwrapper.py +++ b/wrappers/cpp/genwrapper.py @@ -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' : [],