Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
BC
public
liblinphone
Commits
8d4c44e8
Commit
8d4c44e8
authored
Jun 17, 2016
by
Ghislain MARY
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Python module automatic code generation.
parent
af2ecd8c
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
32 additions
and
32 deletions
+32
-32
coreapi/conference.h
coreapi/conference.h
+2
-2
coreapi/friendlist.h
coreapi/friendlist.h
+2
-2
coreapi/linphone_tunnel.h
coreapi/linphone_tunnel.h
+1
-1
coreapi/linphonefriend.h
coreapi/linphonefriend.h
+3
-3
coreapi/lpconfig.h
coreapi/lpconfig.h
+2
-2
coreapi/vcard.h
coreapi/vcard.h
+5
-5
tools/genapixml.py
tools/genapixml.py
+3
-3
tools/python/apixml2python/handwritten_declarations.mustache
tools/python/apixml2python/handwritten_declarations.mustache
+2
-2
tools/python/apixml2python/handwritten_definitions.mustache
tools/python/apixml2python/handwritten_definitions.mustache
+5
-5
tools/python/apixml2python/linphone.py
tools/python/apixml2python/linphone.py
+2
-2
tools/python/apixml2python/linphone_module.mustache
tools/python/apixml2python/linphone_module.mustache
+5
-5
No files found.
coreapi/conference.h
View file @
8d4c44e8
...
...
@@ -97,12 +97,12 @@ LINPHONE_PUBLIC int linphone_conference_remove_participant(LinphoneConference *o
/**
* Get URIs of all participants of one conference
* The returned
MSLis
t contains URIs of all participant. That list must be
* The returned
bctbx_list_
t contains URIs of all participant. That list must be
* freed after use and each URI must be unref with linphone_address_unref()
* @param obj A #LinphoneConference
* @return \mslist{LinphoneAddress}
*/
LINPHONE_PUBLIC
MSLis
t
*
linphone_conference_get_participants
(
const
LinphoneConference
*
obj
);
LINPHONE_PUBLIC
bctbx_list_
t
*
linphone_conference_get_participants
(
const
LinphoneConference
*
obj
);
/**
* @}
...
...
coreapi/friendlist.h
View file @
8d4c44e8
...
...
@@ -89,7 +89,7 @@ LINPHONE_PUBLIC void linphone_core_remove_friend_list(LinphoneCore *lc, Linphone
* @param[in] lc LinphoneCore object
* @return \mslist{LinphoneFriendList} a list of LinphoneFriendList
*/
LINPHONE_PUBLIC
const
MSLis
t
*
linphone_core_get_friends_lists
(
const
LinphoneCore
*
lc
);
LINPHONE_PUBLIC
const
bctbx_list_
t
*
linphone_core_get_friends_lists
(
const
LinphoneCore
*
lc
);
/**
* Retrieves the first list of LinphoneFriend from the core.
...
...
@@ -183,7 +183,7 @@ LINPHONE_PUBLIC LinphoneFriendListStatus linphone_friend_list_remove_friend(Linp
* @param[in] list LinphoneFriendList object
* @return \mslist{LinphoneFriend} a list of LinphoneFriend
*/
LINPHONE_PUBLIC
const
MSLis
t
*
linphone_friend_list_get_friends
(
const
LinphoneFriendList
*
list
);
LINPHONE_PUBLIC
const
bctbx_list_
t
*
linphone_friend_list_get_friends
(
const
LinphoneFriendList
*
list
);
/**
* Find a friend in the friend list using a LinphoneAddress.
...
...
coreapi/linphone_tunnel.h
View file @
8d4c44e8
...
...
@@ -229,7 +229,7 @@ LINPHONE_PUBLIC void linphone_tunnel_remove_server(LinphoneTunnel *tunnel, Linph
* @param tunnel LinphoneTunnel object
* @return \mslist{LinphoneTunnelConfig}
*/
LINPHONE_PUBLIC
const
MSLis
t
*
linphone_tunnel_get_servers
(
const
LinphoneTunnel
*
tunnel
);
LINPHONE_PUBLIC
const
bctbx_list_
t
*
linphone_tunnel_get_servers
(
const
LinphoneTunnel
*
tunnel
);
/**
* Remove all tunnel server addresses previously entered with linphone_tunnel_add_server()
...
...
coreapi/linphonefriend.h
View file @
8d4c44e8
...
...
@@ -176,7 +176,7 @@ LINPHONE_PUBLIC void linphone_friend_add_address(LinphoneFriend *lf, const Linph
* @param lf #LinphoneFriend object
* @return \mslist{LinphoneAddress}
*/
LINPHONE_PUBLIC
MSLis
t
*
linphone_friend_get_addresses
(
LinphoneFriend
*
lf
);
LINPHONE_PUBLIC
bctbx_list_
t
*
linphone_friend_get_addresses
(
LinphoneFriend
*
lf
);
/**
* Removes an address in this friend
...
...
@@ -197,7 +197,7 @@ LINPHONE_PUBLIC void linphone_friend_add_phone_number(LinphoneFriend *lf, const
* @param lf #LinphoneFriend object
* @return \mslist{const char *}
*/
LINPHONE_PUBLIC
MSLis
t
*
linphone_friend_get_phone_numbers
(
LinphoneFriend
*
lf
);
LINPHONE_PUBLIC
bctbx_list_
t
*
linphone_friend_get_phone_numbers
(
LinphoneFriend
*
lf
);
/**
* Removes a phone number in this friend
...
...
@@ -430,7 +430,7 @@ LINPHONE_PUBLIC void linphone_core_reject_subscriber(LinphoneCore *lc, LinphoneF
* @return \mslist{LinphoneFriend}
* @deprecated use linphone_core_get_friends_lists() or linphone_friend_list_get_friends() instead.
*/
LINPHONE_PUBLIC
const
MSLis
t
*
linphone_core_get_friend_list
(
const
LinphoneCore
*
lc
);
LINPHONE_PUBLIC
const
bctbx_list_
t
*
linphone_core_get_friend_list
(
const
LinphoneCore
*
lc
);
/**
* Notify all friends that have subscribed
...
...
coreapi/lpconfig.h
View file @
8d4c44e8
...
...
@@ -114,7 +114,7 @@ LINPHONE_PUBLIC const char *lp_config_get_string(const LpConfig *lpconfig, const
* @param[in] default_list \mslist{const char *}
* @return \mslist{const char *}
*/
LINPHONE_PUBLIC
MSLis
t
*
lp_config_get_string_list
(
const
LpConfig
*
lpconfig
,
const
char
*
section
,
const
char
*
key
,
MSLis
t
*
default_list
);
LINPHONE_PUBLIC
bctbx_list_
t
*
lp_config_get_string_list
(
const
LpConfig
*
lpconfig
,
const
char
*
section
,
const
char
*
key
,
bctbx_list_
t
*
default_list
);
/**
* Retrieves a configuration item as a range, given its section, key, and default min and max values.
...
...
@@ -164,7 +164,7 @@ LINPHONE_PUBLIC void lp_config_set_string(LpConfig *lpconfig,const char *section
* @param[in] key The name of the configuration item to set
* @param[in] value \mslist{const char *} The value to set
*/
LINPHONE_PUBLIC
void
lp_config_set_string_list
(
LpConfig
*
lpconfig
,
const
char
*
section
,
const
char
*
key
,
const
MSLis
t
*
value
);
LINPHONE_PUBLIC
void
lp_config_set_string_list
(
LpConfig
*
lpconfig
,
const
char
*
section
,
const
char
*
key
,
const
bctbx_list_
t
*
value
);
/**
* Sets a range config item
...
...
coreapi/vcard.h
View file @
8d4c44e8
...
...
@@ -57,14 +57,14 @@ LINPHONE_PUBLIC void linphone_vcard_free(LinphoneVcard *vCard);
* @param[in] file the path to the file to parse
* @return \mslist{LinphoneVcard}
*/
LINPHONE_PUBLIC
MSLis
t
*
linphone_vcard_list_from_vcard4_file
(
const
char
*
file
);
LINPHONE_PUBLIC
bctbx_list_
t
*
linphone_vcard_list_from_vcard4_file
(
const
char
*
file
);
/**
* Uses belcard to parse the content of a buffer and returns all the vcards it contains as LinphoneVcards, or NULL if it contains none.
* @param[in] buffer the buffer to parse
* @return \mslist{LinphoneVcard}
*/
LINPHONE_PUBLIC
MSLis
t
*
linphone_vcard_list_from_vcard4_buffer
(
const
char
*
buffer
);
LINPHONE_PUBLIC
bctbx_list_
t
*
linphone_vcard_list_from_vcard4_buffer
(
const
char
*
buffer
);
/**
* Uses belcard to parse the content of a buffer and returns one vCard if possible, or NULL otherwise.
...
...
@@ -120,7 +120,7 @@ void linphone_vcard_edit_main_sip_address(LinphoneVcard *vCard, const char *sip_
* @param[in] vCard the LinphoneVcard
* @return \mslist{const char *}
*/
LINPHONE_PUBLIC
MSLis
t
*
linphone_vcard_get_sip_addresses
(
const
LinphoneVcard
*
vCard
);
LINPHONE_PUBLIC
bctbx_list_
t
*
linphone_vcard_get_sip_addresses
(
const
LinphoneVcard
*
vCard
);
/**
* Adds a phone number in the vCard, using the TEL property
...
...
@@ -141,14 +141,14 @@ void linphone_vcard_remove_phone_number(LinphoneVcard *vCard, const char *phone)
* @param[in] vCard the LinphoneVcard
* @return \mslist{const char *}
*/
LINPHONE_PUBLIC
MSLis
t
*
linphone_vcard_get_phone_numbers
(
const
LinphoneVcard
*
vCard
);
LINPHONE_PUBLIC
bctbx_list_
t
*
linphone_vcard_get_phone_numbers
(
const
LinphoneVcard
*
vCard
);
/**
* Returns the list of SIP addresses (as string) in the vCard (all the IMPP attributes that has an URI value starting by "sip:") or NULL
* @param[in] vCard the LinphoneVcard
* @return \mslist{const char *}
*/
LINPHONE_PUBLIC
MSLis
t
*
linphone_vcard_get_sip_addresses
(
const
LinphoneVcard
*
vCard
);
LINPHONE_PUBLIC
bctbx_list_
t
*
linphone_vcard_get_sip_addresses
(
const
LinphoneVcard
*
vCard
);
/**
* Fills the Organization field of the vCard
...
...
tools/genapixml.py
View file @
8d4c44e8
...
...
@@ -436,7 +436,7 @@ class Project:
returnarg
=
CArgument
(
returntype
,
enums
=
self
.
enums
,
structs
=
self
.
__structs
)
returndesc
=
node
.
find
(
"./detaileddescription/para/simplesect[@kind='return']"
)
if
returndesc
is
not
None
:
if
returnarg
.
ctype
==
'MSList'
:
if
returnarg
.
ctype
==
'MSList'
or
returnarg
.
ctype
==
'bctbx_list_t'
:
n
=
returndesc
.
find
(
'.//mslist'
)
if
n
is
not
None
:
returnarg
.
containedType
=
n
.
text
...
...
@@ -507,7 +507,7 @@ class Project:
returnarg
=
CArgument
(
t
,
enums
=
self
.
enums
,
structs
=
self
.
__structs
)
returndesc
=
node
.
find
(
"./detaileddescription/para/simplesect[@kind='return']"
)
if
returndesc
is
not
None
:
if
returnarg
.
ctype
==
'MSList'
:
if
returnarg
.
ctype
==
'MSList'
or
returnarg
.
ctype
==
'bctbx_list_t'
:
n
=
returndesc
.
find
(
'.//mslist'
)
if
n
is
not
None
:
returnarg
.
containedType
=
n
.
text
...
...
@@ -530,7 +530,7 @@ class Project:
for
arg
in
argslist
.
arguments
:
for
paramdesc
in
paramdescs
:
if
arg
.
name
==
paramdesc
.
find
(
'./parameternamelist'
).
find
(
'./parametername'
).
text
:
if
arg
.
ctype
==
'MSList'
:
if
arg
.
ctype
==
'MSList'
or
arg
.
ctype
==
'bctbx_list_t'
:
n
=
paramdesc
.
find
(
'.//mslist'
)
if
n
is
not
None
:
arg
.
containedType
=
n
.
text
...
...
tools/python/apixml2python/handwritten_declarations.mustache
View file @
8d4c44e8
...
...
@@ -24,8 +24,8 @@ typedef struct {
LCSipTransports lcst;
} pylinphone_SipTransportsObject;
PyObject * PyList_FromMSListOfString(const
MSLis
t *msl);
MSLis
t * PyList_AsMSListOfString(PyObject *pyl);
PyObject * PyList_FromMSListOfString(const
bctbx_list_
t *msl);
bctbx_list_
t * PyList_AsMSListOfString(PyObject *pyl);
int PyLinphoneVideoSize_Check(PyObject *p);
MSVideoSize PyLinphoneVideoSize_AsMSVideoSize(PyObject *obj);
...
...
tools/python/apixml2python/handwritten_definitions.mustache
View file @
8d4c44e8
PyObject * PyList_FromMSListOfString(const
MSLis
t *msl) {
PyObject * PyList_FromMSListOfString(const
bctbx_list_
t *msl) {
PyObject *pyl = PyList_New(0);
while (msl != NULL) {
PyObject *item = Py_BuildValue("z", (const char *)msl->data);
PyList_Append(pyl, item);
msl =
ms
_list_next(msl);
msl =
bctbx
_list_next(msl);
}
return pyl;
}
MSLis
t * PyList_AsMSListOfString(PyObject *pyl) {
MSLis
t *msl = NULL;
bctbx_list_
t * PyList_AsMSListOfString(PyObject *pyl) {
bctbx_list_
t *msl = NULL;
Py_ssize_t idx;
Py_ssize_t size = PyList_Size(pyl);
for (idx = 0; idx
<
size
;
idx
++)
{
PyObject
*item =
PyList_GetItem(pyl,
idx
);
char
*citem =
(char
*
)
PyString_AsString
(
item
);
msl =
ms
_list_append(msl,
citem
);
msl =
bctbx
_list_append(msl,
citem
);
}
return
msl
;
}
...
...
tools/python/apixml2python/linphone.py
View file @
8d4c44e8
...
...
@@ -101,7 +101,7 @@ class ArgumentType:
self
.
use_native_pointer
=
False
self
.
cast_convert_func_result
=
True
self
.
__compute
()
if
self
.
basic_type
==
'MSList'
and
self
.
contained_type
is
not
None
and
self
.
contained_type
!=
'const char *'
:
if
(
self
.
basic_type
==
'MSList'
or
self
.
basic_type
==
'bctbx_list_t'
)
and
self
.
contained_type
is
not
None
and
self
.
contained_type
!=
'const char *'
:
self
.
linphone_module
.
mslist_types
.
add
(
self
.
contained_type
)
def
__compute
(
self
):
...
...
@@ -214,7 +214,7 @@ class ArgumentType:
self
.
fmt_str
=
'O'
self
.
cfmt_str
=
'%p'
self
.
cnativefmt_str
=
'%ld'
elif
self
.
basic_type
==
'MSList'
:
elif
self
.
basic_type
==
'MSList'
or
self
.
basic_type
==
'bctbx_list_t'
:
if
self
.
contained_type
==
'const char *'
:
self
.
type_str
=
'list of string'
self
.
convert_code
=
"{result_name}{result_suffix} = {cast}PyList_AsMSListOfString({arg_name});
\n
"
...
...
tools/python/apixml2python/linphone_module.mustache
View file @
8d4c44e8
...
...
@@ -72,25 +72,25 @@ static PyObject * pylinphone_{{class_name}}_instance_method_{{method_name}}(PyOb
{{/
classes
}}
{{#
mslist_types
}}
PyObject * PyList_FromMSListOf
{{
c_contained_type
}}
(const
MSLis
t *msl) {
PyObject * PyList_FromMSListOf
{{
c_contained_type
}}
(const
bctbx_list_
t *msl) {
PyObject *pyl = PyList_New(0);
while (msl != NULL) {
{{
c_contained_type
}}
*native_ptr = (
{{
c_contained_type
}}
*)msl->data;
PyObject *item = pylinphone_
{{
python_contained_type
}}
_from_native_ptr(
&
pylinphone_
{{
python_contained_type
}}
Type, native_ptr);
PyList_Append(pyl, item);
msl =
ms
_list_next(msl);
msl =
bctbx
_list_next(msl);
}
return pyl;
}
MSLis
t * PyList_AsMSListOf
{{
c_contained_type
}}
(PyObject *pyl) {
MSLis
t *msl = NULL;
bctbx_list_
t * PyList_AsMSListOf
{{
c_contained_type
}}
(PyObject *pyl) {
bctbx_list_
t *msl = NULL;
Py_ssize_t idx;
Py_ssize_t size = PyList_Size(pyl);
for (idx = 0; idx
<
size
;
idx
++)
{
PyObject
*item =
PyList_GetItem(pyl,
idx
);
{{
c_contained_type
}}
*native_ptr =
pylinphone_
{{
python_contained_type
}}
_get_native_ptr
(
item
);
msl =
ms
_list_append(msl,
native_ptr
);
msl =
bctbx
_list_append(msl,
native_ptr
);
}
return
msl
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment