mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
* Support of enums declared inside classes. * Moving of Java translation code into abstractapi.py in order to have Java's API in the generated multi-language documentation.
181 lines
3.9 KiB
Text
181 lines
3.9 KiB
Text
/*
|
|
Copyright (C) 2017 Belledonne Communications SARL
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU General Public License
|
|
as published by the Free Software Foundation; either version 2
|
|
of the License, or (at your option) any later version.
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with this program; if not, write to the Free Software
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
*/
|
|
|
|
#ifndef {{define}}
|
|
#define {{define}}
|
|
|
|
{{#includes}}
|
|
{{#external}}
|
|
#include <{{name}}>
|
|
{{/external}}
|
|
{{#internal}}
|
|
#include "{{name}}.hh"
|
|
{{/internal}}
|
|
{{/includes}}
|
|
#include "object.hh"
|
|
|
|
{{#_class}}{{#isVcard}}
|
|
namespace belcard {
|
|
class BelCard;
|
|
}
|
|
{{/isVcard}}{{/_class}}
|
|
|
|
|
|
{{#_class}}
|
|
{{#isNotListener}}
|
|
struct {{{privCClassName}}};
|
|
{{/isNotListener}}
|
|
{{/_class}}
|
|
|
|
|
|
namespace linphone {
|
|
|
|
{{#priorDeclarations}}
|
|
{{{declaration}}};
|
|
{{/priorDeclarations}}
|
|
|
|
{{#_class}}
|
|
/**
|
|
{{#briefDoc}}
|
|
{{#lines}}
|
|
* {{{line}}}
|
|
{{/lines}}
|
|
{{/briefDoc}}
|
|
*
|
|
{{#detailedDoc}}
|
|
{{#lines}}
|
|
* {{{line}}}
|
|
{{/lines}}
|
|
{{/detailedDoc}}
|
|
*/
|
|
class {{className}}{{#parentClassName}}: public {{{parentClassName}}}{{/parentClassName}} {
|
|
{{#friendClasses}}
|
|
friend class {{name}};
|
|
{{/friendClasses}}
|
|
|
|
public:
|
|
{{#enums}}
|
|
{{#doc}}
|
|
/**
|
|
{{#lines}}
|
|
* {{{line}}}
|
|
{{/lines}}
|
|
*
|
|
*/
|
|
{{/doc}}
|
|
enum class {{name}} {
|
|
{{#enumerators}}
|
|
{{#doc}}
|
|
/**
|
|
{{#lines}}
|
|
* {{{line}}}
|
|
{{/lines}}
|
|
*/
|
|
{{/doc}}
|
|
{{name}}{{#value}} = {{{value}}}{{/value}}{{#notLast}},{{/notLast}}
|
|
{{/enumerators}}
|
|
};
|
|
|
|
{{/enums}}
|
|
|
|
{{#isNotListener}}
|
|
{{#isrefcountable}}
|
|
{{{className}}}(void *ptr, bool takeRef=true);
|
|
{{/isrefcountable}}
|
|
{{#isnotrefcountable}}
|
|
LINPHONECXX_PUBLIC {{{className}}}();
|
|
LINPHONECXX_PUBLIC {{{className}}}(const {{{className}}} &src);
|
|
{{{className}}}(const void *src);
|
|
LINPHONECXX_PUBLIC ~{{{className}}}();
|
|
LINPHONECXX_PUBLIC const void *c_struct() const {return mPrivPtr;}
|
|
{{/isnotrefcountable}}
|
|
LINPHONECXX_PUBLIC {{{privCClassName}}} *cPtr() {return ({{{privCClassName}}} *)mPrivPtr;}
|
|
{{/isNotListener}}
|
|
|
|
{{#ismonolistenable}}
|
|
LINPHONECXX_PUBLIC void setListener(const std::shared_ptr<{{{listenerClassName}}}> &listener);
|
|
{{/ismonolistenable}}
|
|
|
|
{{#ismultilistenable}}
|
|
LINPHONECXX_PUBLIC virtual ~{{{className}}}();
|
|
LINPHONECXX_PUBLIC void addListener(const std::shared_ptr<{{{listenerClassName}}}> &listener);
|
|
LINPHONECXX_PUBLIC void removeListener(const std::shared_ptr<{{{listenerClassName}}}> &listener);
|
|
{{/ismultilistenable}}
|
|
|
|
public:
|
|
{{#isVcard}}
|
|
LINPHONECXX_PUBLIC std::shared_ptr<belcard::BelCard> &getVcard();
|
|
{{/isVcard}}
|
|
|
|
|
|
{{#methods}}
|
|
/**
|
|
{{#briefDoc}}
|
|
{{#lines}}
|
|
* {{{line}}}
|
|
{{/lines}}
|
|
{{/briefDoc}}
|
|
*
|
|
{{#detailedDoc}}
|
|
{{#lines}}
|
|
* {{{line}}}
|
|
{{/lines}}
|
|
{{/detailedDoc}}
|
|
*/
|
|
LINPHONECXX_PUBLIC {{#deprecated}}LINPHONECXX_DEPRECATED {{/deprecated}}{{#isListener}}virtual {{/isListener}}{{{declPrototype}}}{{{suffix}}};
|
|
|
|
{{/methods}}
|
|
{{#staticMethods}};
|
|
/**
|
|
{{#briefDoc}}
|
|
{{#lines}}
|
|
* {{{line}}}
|
|
{{/lines}}
|
|
{{/briefDoc}}
|
|
*
|
|
{{#detailedDoc}}
|
|
{{#lines}}
|
|
* {{{line}}}
|
|
{{/lines}}
|
|
{{/detailedDoc}}
|
|
*/
|
|
LINPHONECXX_PUBLIC {{#deprecated}}LINPHONECXX_DEPRECATED {{/deprecated}}static {{{declPrototype}}};
|
|
|
|
{{/staticMethods}}
|
|
|
|
{{#ismultilistenable}}
|
|
private:
|
|
static void *createCallbacks(void *userData);
|
|
{{/ismultilistenable}}
|
|
|
|
|
|
{{#ismultilistenable}}
|
|
private:
|
|
void *mCallbacks;
|
|
{{/ismultilistenable}}
|
|
|
|
{{#isnotrefcountable}}
|
|
private:
|
|
void *mPrivPtr;
|
|
{{/isnotrefcountable}}
|
|
};
|
|
{{/_class}}
|
|
|
|
};
|
|
|
|
#endif // {{define}}
|