Ignore:
Timestamp:
Oct 29, 2009 8:16:46 AM (14 years ago)
Author:
bennylp
Message:

More ticket #982: added MWI support for Python

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/python/_pjsua.h

    r2859 r2976  
    236236    PyObject * on_pager_status; 
    237237    PyObject * on_typing; 
     238    PyObject * on_mwi_info; 
    238239} PyObj_pjsua_callback; 
    239240 
     
    259260    Py_XDECREF(self->on_pager_status); 
    260261    Py_XDECREF(self->on_typing); 
     262    Py_XDECREF(self->on_mwi_info); 
    261263    self->ob_type->tp_free((PyObject*)self); 
    262264} 
     
    292294        self->on_pager_status = Py_BuildValue(""); 
    293295        self->on_typing = Py_BuildValue(""); 
     296        self->on_mwi_info = Py_BuildValue(""); 
    294297    } 
    295298 
     
    394397        offsetof(PyObj_pjsua_callback, on_typing), 0, 
    395398        "Notify application about typing indication." 
     399    }, 
     400    { 
     401        "on_mwi_info", T_OBJECT_EX,  
     402        offsetof(PyObj_pjsua_callback, on_mwi_info), 0, 
     403        "Notify application about MWI indication." 
    396404    }, 
    397405    {NULL}  /* Sentinel */ 
     
    16461654    PyObject        *reg_uri; 
    16471655    int              publish_enabled; 
     1656    int              mwi_enabled; 
    16481657    PyObject        *force_contact; 
    16491658    PyListObject    *proxy; 
     
    16991708    obj->reg_uri    = PyString_FromPJ(&cfg->reg_uri); 
    17001709    obj->publish_enabled = cfg->publish_enabled; 
     1710    obj->mwi_enabled = cfg->mwi_enabled; 
    17011711    Py_XDECREF(obj->force_contact); 
    17021712    obj->force_contact = PyString_FromPJ(&cfg->force_contact); 
     
    17541764    cfg->reg_uri    = PyString_ToPJ(obj->reg_uri); 
    17551765    cfg->publish_enabled = obj->publish_enabled; 
     1766    cfg->mwi_enabled = obj->mwi_enabled; 
    17561767    cfg->force_contact = PyString_ToPJ(obj->force_contact); 
    17571768 
     
    18571868        offsetof(PyObj_pjsua_acc_config, publish_enabled), 0, 
    18581869        "Publish presence? " 
     1870    }, 
     1871    { 
     1872        "mwi_enabled", T_INT,  
     1873        offsetof(PyObj_pjsua_acc_config, mwi_enabled), 0, 
     1874        "Enable MWI subscription " 
    18591875    }, 
    18601876    { 
Note: See TracChangeset for help on using the changeset viewer.