Commit 69e19e22 authored by François Grisez's avatar François Grisez

Change declaration of LinphoneStatus from enum to typedef

parent 4e504716
......@@ -1194,10 +1194,7 @@ typedef struct _LinphoneIntRange {
* done or not.
* @ingroup misc
*/
typedef enum _LinphoneStatus {
LinphoneStatusOk = 0, /**< The function has successfully returned. */
LinphoneStatusError = -1 /**< An error has occured while executing the function. */
} LinphoneStatus;
typedef int LinphoneStatus;
#endif /* LINPHONE_TYPES_H_ */
......@@ -447,7 +447,7 @@ class Interface(DocumentableObject):
class CParser(object):
def __init__(self, cProject):
self.cBaseType = ['void', 'bool_t', 'char', 'short', 'int', 'long', 'size_t', 'time_t', 'float', 'double']
self.cBaseType = ['void', 'bool_t', 'char', 'short', 'int', 'long', 'size_t', 'time_t', 'float', 'double', 'LinphoneStatus']
self.cListType = 'bctbx_list_t'
self.regexFixedSizeInteger = '^(u?)int(\d?\d)_t$'
self.methodBl = ['ref', 'unref', 'new', 'destroy', 'getCurrentCallbacks', 'setUserData', 'getUserData']
......@@ -798,6 +798,8 @@ class CParser(object):
param['size'] = 'long double'
else:
param['size'] = 'double'
elif elem == 'LinphoneStatus':
name = 'status'
elif elem == '*':
if name is not None:
if name == 'character':
......
......@@ -29,6 +29,8 @@ namespace linphone {
};
{{/enums}}
typedef int Status;
};
#endif //_ENUMS_HH
......@@ -405,6 +405,8 @@ class CppTranslator(object):
res = 'double'
else:
res = 'float'
elif _type.name == 'status':
res = 'linphone::Status'
elif _type.name == 'string':
res = 'std::string'
if type(_type.parent) is AbsApi.Argument:
......
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