xcap_callbacks.h

Go to the documentation of this file.
00001 /*
00002  * $Id: xcap_callback.h,v 1.2 2007/02/20 13:40:09 anca_vamanu Exp $
00003  *
00004  * xcap_client module - openser xcap client module
00005  *
00006  * Copyright (C) 2007 Voice Sistem S.R.L.
00007  *
00008  * This file is part of Kamailio, a free SIP server.
00009  *
00010  * Kamailio is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version
00014  *
00015  * Kamailio is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License 
00021  * along with this program; if not, write to the Free Software 
00022  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00023  * 
00024  *History:
00025  *--------
00026  *  2007-08-30  initial version (anca)
00027  */
00028 
00029 #ifndef XCAP_CBACK
00030 #define XCAP_CBACK
00031 
00032 #include "../../str.h"
00033 
00034 #define PRES_RULES         1<<1
00035 #define RESOURCE_LIST      1<<2
00036 #define RLS_SERVICE        1<<3
00037 #define PIDF_MANIPULATION  1<<4
00038 
00039 
00040 /* callback function prototype */
00041 typedef int (xcap_cb)(int doc_type, str xid, char* doc);
00042 
00043 /* register callback function prototype */
00044 typedef int (*register_xcapcb_t)(int types, xcap_cb f);
00045 
00046 
00047 typedef struct xcap_callback {
00048    int types;                   /* types of events that trigger the callback*/
00049    xcap_cb* callback;            /* callback function */
00050    struct xcap_callback* next;
00051 }xcap_callback_t;
00052 
00053 /* destroy registered callback list */
00054 void destroy_xcapcb_list(void);
00055 
00056 /* register a callback for several types of events */
00057 int register_xcapcb( int types, xcap_cb f);
00058 
00059 /* run all transaction callbacks for an composed type */
00060 void run_xcap_update_cb(int type, str xid, char* stream);
00061 
00062 #endif

Generated on Fri May 25 00:00:35 2012 for Kamailio - The Open Source SIP Server by  doxygen 1.5.6