src/modules/pua/send_publish.h
2edef75a
 /*
  * pua module - presence user agent module
  *
  * Copyright (C) 2006 Voice Sistem S.R.L.
  *
27642a08
  * This file is part of Kamailio, a free SIP server.
2edef75a
  *
27642a08
  * Kamailio is free software; you can redistribute it and/or modify
2edef75a
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version
  *
27642a08
  * Kamailio is distributed in the hope that it will be useful,
2edef75a
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License 
  * along with this program; if not, write to the Free Software 
9e1ff448
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
2edef75a
  */
 
 
 #ifndef _PU_SEND_PUBLISH_
 #define _PU_SEND_PUBLISH_
 #include <time.h>
eb38b3df
 #include "../../modules/tm/tm_load.h"
cf83221d
 #include "../../core/str.h"
2edef75a
 #include "hash.h"
4b79a143
 #include "event_list.h"
bc5c7215
 #define ERR_PUBLISH_NO_BODY -10
2edef75a
 
 typedef struct publ_info
 {
 	str id;
 	str* pres_uri;
 	str* body;
 	int expires;
 	int flag;
 	int source_flag;
6846ce66
 	int event;
 	str content_type;  /*! the content_type of the body if present(optional if the
 				same as the default value for that event) */
d2e93471
 	str* etag;
b0d089b6
 	str* outbound_proxy;
5561e875
 	str* extra_headers;
6846ce66
 	void* cb_param;   /*! the parameter for the function to be called on the callback 
 				for the received reply; it must be allocated in share memory;
 				a reference to it will be found in the cb_param filed of the ua_pres_structure
 				receied as a parameter for the registered function*/
2edef75a
 }publ_info_t;
 
 typedef int (*send_publish_t)(publ_info_t* publ);
 int send_publish( publ_info_t* publ );
feaff680
 
772b6553
 void publ_cback_func(struct cell *t, int type, struct tmcb_params *ps);
4b79a143
 str* publ_build_hdr(int expires, pua_event_t* event, str* content_type, str* etag,
 		str* extra_headers, int is_body);
232401de
 ua_pres_t* publish_cbparam(publ_info_t* publ, str* body, str* tuple_id,
 		int ua_flag);
2edef75a
 
 #endif