Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
af6678a9
Commit
af6678a9
authored
Aug 20, 2014
by
Ghislain MARY
Browse files
Hand-written implementation of linphone_core_get_sound_devices() in the Python wrapper.
parent
7a79aa17
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
tools/python/apixml2python.py
tools/python/apixml2python.py
+1
-0
tools/python/apixml2python/handwritten_declarations.mustache
tools/python/apixml2python/handwritten_declarations.mustache
+1
-0
tools/python/apixml2python/handwritten_definitions.mustache
tools/python/apixml2python/handwritten_definitions.mustache
+25
-0
No files found.
tools/python/apixml2python.py
View file @
af6678a9
...
...
@@ -80,6 +80,7 @@ blacklisted_functions = [
]
hand_written_functions
=
[
'linphone_chat_room_send_message2'
,
'linphone_core_get_sound_devices'
,
'linphone_core_get_video_devices'
,
'linphone_core_new'
,
'linphone_core_new_with_config'
...
...
tools/python/apixml2python/handwritten_declarations.mustache
View file @
af6678a9
static PyObject * pylinphone_Core_get_sound_devices(PyObject *self, void *closure);
static PyObject * pylinphone_Core_get_video_devices(PyObject *self, void *closure);
static PyTypeObject pylinphone_VideoSizeType;
...
...
tools/python/apixml2python/handwritten_definitions.mustache
View file @
af6678a9
...
...
@@ -115,6 +115,31 @@ static PyObject * pylinphone_module_method_set_log_handler(PyObject *self, PyObj
}
static PyObject * pylinphone_Core_get_sound_devices(PyObject *self, void *closure) {
PyObject *_list;
const char **_devices;
LinphoneCore *native_ptr = pylinphone_Core_get_native_ptr(self);
if (native_ptr == NULL) {
PyErr_SetString(PyExc_TypeError, "Invalid linphone.Core instance");
return NULL;
}
pylinphone_trace(1, "[PYLINPHONE] >>> %s(%p [%p])", __FUNCTION__, self, native_ptr);
_devices = linphone_core_get_sound_devices(native_ptr);
pylinphone_dispatch_messages();
_list = PyList_New(0);
while (*_devices != NULL) {
PyObject *_item = PyString_FromString(*_devices);
PyList_Append(_list, _item);
_devices++;
}
pylinphone_trace(-1, "[PYLINPHONE]
<
<<
%
s
-
>
%p", __FUNCTION__, _list);
return _list;
}
static PyObject * pylinphone_Core_get_video_devices(PyObject *self, void *closure) {
PyObject *_list;
const char **_devices;
...
...
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