forked from mirrors/linphone-iphone
Fix build of Python module.
This commit is contained in:
parent
e90de14ba5
commit
cb7fb1044e
3 changed files with 155 additions and 0 deletions
|
|
@ -76,6 +76,9 @@ hand_written_functions = [
|
|||
HandWrittenClassMethod('Buffer', 'new_from_data', 'linphone_buffer_new_from_data', "Create a new LinphoneBuffer object from existing data.\n\n:param data: The initial data to store in the LinphoneBuffer.\n:type data: ByteArray\n:returns: A new LinphoneBuffer object.\n:rtype: linphone.Buffer"),
|
||||
HandWrittenProperty('Buffer', 'content', 'linphone_buffer_get_content', 'linphone_buffer_set_content', "[ByteArray] Set the content of the data buffer."),
|
||||
HandWrittenProperty('Content', 'buffer', 'linphone_content_get_buffer', 'linphone_content_set_buffer', "[ByteArray] Set the content data buffer."),
|
||||
HandWrittenProperty('Call', 'native_video_window_id', 'linphone_call_get_native_video_window_id', 'linphone_call_set_native_video_window_id', "[int] Set the native video window id where the video is to be displayed."),
|
||||
HandWrittenProperty('Core', 'native_preview_window_id', 'linphone_core_get_native_preview_window_id', 'linphone_core_set_native_preview_window_id', "[int] Set the native window id where the preview video (local camera) is to be displayed. This has to be used in conjonction with :py:meth:`linphone.Core.use_preview_window` . MacOS, Linux, Windows: if not set or zero the core will create its own window, unless the special id -1 is given."),
|
||||
HandWrittenProperty('Core', 'native_video_window_id', 'linphone_core_get_native_video_window_id', 'linphone_core_set_native_video_window_id', "[int] Set the native video window id where the video is to be displayed. For MacOS, Linux, Windows: if not set or LINPHONE_VIDEO_DISPLAY_AUTO the core will create its own window, unless the special id LINPHONE_VIDEO_DISPLAY_NONE is given."),
|
||||
HandWrittenProperty('Core', 'sip_transports', 'linphone_core_get_sip_transports', 'linphone_core_set_sip_transports', "[:py:class:`linphone.SipTransports`] Sets the ports to be used for each transport. A zero value port for a given transport means the transport is not used. A value of LC_SIP_TRANSPORT_RANDOM (-1) means the port is to be chosen randomly by the system."),
|
||||
HandWrittenProperty('Core', 'sip_transports_used', 'linphone_core_get_sip_transports_used', None, "[:py:class:`linphone.SipTransports`] Retrieves the real port number assigned for each sip transport (udp, tcp, tls). A zero value means that the transport is not activated. If LC_SIP_TRANSPORT_RANDOM was passed to :py:attr:`linphone.Core.sip_transports`, the random port choosed by the system is returned."),
|
||||
HandWrittenProperty('Core', 'sound_devices', 'linphone_core_get_sound_devices', None, "[list of string] Get the available sound devices."),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,9 @@
|
|||
static PyObject * pylinphone_Call_get_native_video_window_id(PyObject *self, void *closure);
|
||||
static int pylinphone_Call_set_native_video_window_id(PyObject *self, PyObject *value, void *closure);
|
||||
static PyObject * pylinphone_Core_get_native_preview_window_id(PyObject *self, void *closure);
|
||||
static int pylinphone_Core_set_native_preview_window_id(PyObject *self, PyObject *value, void *closure);
|
||||
static PyObject * pylinphone_Core_get_native_video_window_id(PyObject *self, void *closure);
|
||||
static int pylinphone_Core_set_native_video_window_id(PyObject *self, PyObject *value, void *closure);
|
||||
static PyObject * pylinphone_Core_get_sip_transports(PyObject *self, void *closure);
|
||||
static int pylinphone_Core_set_sip_transports(PyObject *self, PyObject *value, void *closure);
|
||||
static void pylinphone_Core_dealloc(PyObject *self);
|
||||
|
|
|
|||
|
|
@ -128,6 +128,152 @@ static PyObject * pylinphone_module_method_set_log_handler(PyObject *self, PyObj
|
|||
}
|
||||
|
||||
|
||||
static PyObject * pylinphone_Call_get_native_video_window_id(PyObject *self, void *closure) {
|
||||
void * cresult;
|
||||
PyObject * pyresult;
|
||||
PyObject * pyret;
|
||||
const LinphoneCall *native_ptr;
|
||||
native_ptr = pylinphone_Call_get_native_ptr(self);
|
||||
if (native_ptr == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError, "Invalid linphone.Call instance");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pylinphone_trace(1, "[PYLINPHONE] >>> %s(%p [%p])", __FUNCTION__, self, native_ptr);
|
||||
cresult = linphone_call_get_native_video_window_id(native_ptr);
|
||||
pylinphone_dispatch_messages();
|
||||
|
||||
pyret = Py_BuildValue("k", (unsigned long)cresult);
|
||||
|
||||
pylinphone_trace(-1, "[PYLINPHONE] <<< %s -> %p", __FUNCTION__, pyret);
|
||||
return pyret;
|
||||
}
|
||||
|
||||
static int pylinphone_Call_set_native_video_window_id(PyObject *self, PyObject *value, void *closure) {
|
||||
LinphoneCall *native_ptr;
|
||||
unsigned long _id;
|
||||
native_ptr = pylinphone_Call_get_native_ptr(self);
|
||||
if (native_ptr == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError, "Invalid linphone.Call instance");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (value == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError, "Cannot delete the 'native_video_window_id' attribute.");
|
||||
return -1;
|
||||
}
|
||||
if (!PyInt_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "The 'native_video_window_id' attribute value must be a unsigned int.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
_id = (unsigned long)PyInt_AsUnsignedLongMask(value);
|
||||
|
||||
pylinphone_trace(1, "[PYLINPHONE] >>> %s(%p [%p], %u)", __FUNCTION__, self, native_ptr, _id);
|
||||
linphone_call_set_native_video_window_id(native_ptr, (void *)_id);
|
||||
pylinphone_dispatch_messages();
|
||||
pylinphone_trace(-1, "[PYLINPHONE] <<< %s -> 0", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static PyObject * pylinphone_Core_get_native_preview_window_id(PyObject *self, void *closure) {
|
||||
void * cresult;
|
||||
PyObject * pyresult;
|
||||
PyObject * pyret;
|
||||
const LinphoneCore *native_ptr;
|
||||
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);
|
||||
cresult = linphone_core_get_native_preview_window_id(native_ptr);
|
||||
pylinphone_dispatch_messages();
|
||||
|
||||
pyret = Py_BuildValue("k", (unsigned long)cresult);
|
||||
|
||||
pylinphone_trace(-1, "[PYLINPHONE] <<< %s -> %p", __FUNCTION__, pyret);
|
||||
return pyret;
|
||||
}
|
||||
|
||||
static int pylinphone_Core_set_native_preview_window_id(PyObject *self, PyObject *value, void *closure) {
|
||||
LinphoneCore *native_ptr;
|
||||
unsigned long _id;
|
||||
native_ptr = pylinphone_Core_get_native_ptr(self);
|
||||
if (native_ptr == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError, "Invalid linphone.Core instance");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (value == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError, "Cannot delete the 'native_preview_window_id' attribute.");
|
||||
return -1;
|
||||
}
|
||||
if (!PyInt_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "The 'native_preview_window_id' attribute value must be a unsigned int.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
_id = (unsigned long)PyInt_AsUnsignedLongMask(value);
|
||||
|
||||
pylinphone_trace(1, "[PYLINPHONE] >>> %s(%p [%p], %u)", __FUNCTION__, self, native_ptr, _id);
|
||||
linphone_core_set_native_preview_window_id(native_ptr, (void *)_id);
|
||||
pylinphone_dispatch_messages();
|
||||
pylinphone_trace(-1, "[PYLINPHONE] <<< %s -> 0", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static PyObject * pylinphone_Core_get_native_video_window_id(PyObject *self, void *closure) {
|
||||
void * cresult;
|
||||
PyObject * pyresult;
|
||||
PyObject * pyret;
|
||||
const LinphoneCore *native_ptr;
|
||||
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);
|
||||
cresult = linphone_core_get_native_video_window_id(native_ptr);
|
||||
pylinphone_dispatch_messages();
|
||||
|
||||
pyret = Py_BuildValue("k", (unsigned long)cresult);
|
||||
|
||||
pylinphone_trace(-1, "[PYLINPHONE] <<< %s -> %p", __FUNCTION__, pyret);
|
||||
return pyret;
|
||||
}
|
||||
|
||||
static int pylinphone_Core_set_native_video_window_id(PyObject *self, PyObject *value, void *closure) {
|
||||
LinphoneCore *native_ptr;
|
||||
unsigned long _id;
|
||||
native_ptr = pylinphone_Core_get_native_ptr(self);
|
||||
if (native_ptr == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError, "Invalid linphone.Core instance");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (value == NULL) {
|
||||
PyErr_SetString(PyExc_TypeError, "Cannot delete the 'native_video_window_id' attribute.");
|
||||
return -1;
|
||||
}
|
||||
if (!PyInt_Check(value)) {
|
||||
PyErr_SetString(PyExc_TypeError, "The 'native_video_window_id' attribute value must be a unsigned int.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
_id = (unsigned long)PyInt_AsUnsignedLongMask(value);
|
||||
|
||||
pylinphone_trace(1, "[PYLINPHONE] >>> %s(%p [%p], %u)", __FUNCTION__, self, native_ptr, _id);
|
||||
linphone_core_set_native_video_window_id(native_ptr, (void *)_id);
|
||||
pylinphone_dispatch_messages();
|
||||
pylinphone_trace(-1, "[PYLINPHONE] <<< %s -> 0", __FUNCTION__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static PyObject * pylinphone_Core_get_sip_transports(PyObject *self, void *closure) {
|
||||
PyObject *pytr;
|
||||
LCSipTransports tr = { 0 };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue