Changeset 2156 for pjproject/trunk/pjsip-apps/src/python/_pjsua.h
- Timestamp:
- Jul 18, 2008 11:00:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/python/_pjsua.h
r2119 r2156 508 508 PyObject * on_call_replaced; 509 509 PyObject * on_reg_state; 510 PyObject * on_incoming_subscribe; 510 511 PyObject * on_buddy_state; 511 512 PyObject * on_pager; … … 530 531 Py_XDECREF(self->on_call_replaced); 531 532 Py_XDECREF(self->on_reg_state); 533 Py_XDECREF(self->on_incoming_subscribe); 532 534 Py_XDECREF(self->on_buddy_state); 533 535 Py_XDECREF(self->on_pager); … … 617 619 return NULL; 618 620 } 621 Py_INCREF(Py_None); 622 self->on_incoming_subscribe = Py_None; 619 623 Py_INCREF(Py_None); 620 624 self->on_buddy_state = Py_None; … … 718 722 "Notify application when registration status has changed. Application " 719 723 "may then query the account info to get the registration details." 724 }, 725 { 726 "on_incoming_subscribe", T_OBJECT_EX, 727 offsetof(PyObj_pjsua_callback, on_incoming_subscribe), 0, 728 "Notification when incoming SUBSCRIBE request is received." 720 729 }, 721 730 { … … 2769 2778 int monitor_pres; 2770 2779 int activity; 2780 int sub_state; 2781 PyObject *sub_term_reason; 2771 2782 } PyObj_pjsua_buddy_info; 2772 2783 … … 2782 2793 Py_XDECREF(self->contact); 2783 2794 Py_XDECREF(self->status_text); 2795 Py_XDECREF(self->sub_term_reason); 2784 2796 2785 2797 self->ob_type->tp_free((PyObject*)self); … … 2801 2813 obj->monitor_pres = info->monitor_pres; 2802 2814 obj->activity = info->rpid.activity; 2815 obj->sub_state = info->sub_state; 2816 Py_XDECREF(obj->sub_term_reason); 2817 obj->sub_term_reason = PyString_FromStringAndSize(info->sub_term_reason.ptr, 2818 info->sub_term_reason.slen); 2803 2819 } 2804 2820 … … 2824 2840 Py_DECREF(self); 2825 2841 return NULL; 2826 } 2842 } 2827 2843 self->contact = PyString_FromString(""); 2828 2844 if (self->contact == NULL) { … … 2835 2851 return NULL; 2836 2852 } 2837 2853 self->sub_term_reason = PyString_FromString(""); 2838 2854 } 2839 2855 return (PyObject *)self; … … 2882 2898 offsetof(PyObj_pjsua_buddy_info, activity), 0, 2883 2899 "Activity type. " 2900 }, 2901 { 2902 "sub_state", T_INT, 2903 offsetof(PyObj_pjsua_buddy_info, sub_state), 0, 2904 "Subscription state." 2905 }, 2906 { 2907 "sub_term_reason", T_INT, 2908 offsetof(PyObj_pjsua_buddy_info, sub_term_reason), 0, 2909 "Subscription termination reason." 2884 2910 }, 2885 2911
Note: See TracChangeset
for help on using the changeset viewer.