mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-31 02:09:22 +00:00
Add LINPHONE_PUBLIC macros before public method declarations
This commit is contained in:
parent
971379c6ff
commit
e7312ac464
3 changed files with 12 additions and 8 deletions
|
|
@ -20,7 +20,7 @@ import genapixml as CApi
|
|||
class Error(RuntimeError):
|
||||
pass
|
||||
|
||||
class BlacklistedException:
|
||||
class BlacklistedException(Error):
|
||||
pass
|
||||
|
||||
class Name(object):
|
||||
|
|
@ -193,6 +193,7 @@ class Object(object):
|
|||
def __init__(self, name):
|
||||
self.name = name
|
||||
self.parent = None
|
||||
self.deprecated = False
|
||||
|
||||
def find_first_ancestor_by_type(self, _type):
|
||||
ancestor = self.parent
|
||||
|
|
@ -731,6 +732,7 @@ class CParser(object):
|
|||
raise BlacklistedException('{0} is blacklisted'.format(name.to_c()));
|
||||
|
||||
method = Method(name, type=type)
|
||||
method.deprecated = cfunction.deprecated
|
||||
method.returnType = CParser.parse_type(self, cfunction.returnArgument)
|
||||
|
||||
for arg in cfunction.arguments:
|
||||
|
|
|
|||
|
|
@ -58,21 +58,21 @@ namespace linphone {
|
|||
{{/isNotListener}}
|
||||
|
||||
{{#ismonolistenable}}
|
||||
void setListener(const std::shared_ptr<{{{listenerClassName}}}> &listener);
|
||||
LINPHONE_PUBLIC void setListener(const std::shared_ptr<{{{listenerClassName}}}> &listener);
|
||||
{{/ismonolistenable}}
|
||||
|
||||
{{#ismultilistenable}}
|
||||
void addListener(std::shared_ptr<{{{listenerClassName}}}> &listener);
|
||||
void removeListener(std::shared_ptr<{{{listenerClassName}}}> &listener);
|
||||
LINPHONE_PUBLIC void addListener(std::shared_ptr<{{{listenerClassName}}}> &listener);
|
||||
LINPHONE_PUBLIC void removeListener(std::shared_ptr<{{{listenerClassName}}}> &listener);
|
||||
{{/ismultilistenable}}
|
||||
|
||||
public:
|
||||
{{#isfactory}}
|
||||
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;
|
||||
LINPHONE_PUBLIC std::shared_ptr<Core> createCore(const std::shared_ptr<CoreListener> & cbs, const std::string & configPath, const std::string & factoryConfigPath) const;
|
||||
LINPHONE_PUBLIC 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();
|
||||
LINPHONE_PUBLIC std::shared_ptr<belcard::BelCard> &getVcard();
|
||||
{{/isVcard}}
|
||||
|
||||
{{#methods}}
|
||||
|
|
|
|||
|
|
@ -212,8 +212,10 @@ class CppTranslator(object):
|
|||
else:
|
||||
methodElems['methodType'] = ''
|
||||
|
||||
methodElems['deprecated'] = 'LINPHONE_DEPRECATED ' if method.deprecated else ''
|
||||
|
||||
methodDict = {}
|
||||
methodDict['prototype'] = '{methodType}{return} {name}({params}){const}{semicolon}'.format(**methodElems)
|
||||
methodDict['prototype'] = 'LINPHONE_PUBLIC {deprecated}{methodType}{return} {name}({params}){const}{semicolon}'.format(**methodElems)
|
||||
|
||||
if genImpl:
|
||||
if not CppTranslator.is_ambigous_type(self, method.returnType):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue