1 /*
2  * Copyright (C) 2005 iptelorg GmbH
3  *
4  * This file is part of ser, a free SIP server.
5  *
6  * ser is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version
10  *
11  * For a license to use the ser software under conditions
12  * other than those described here, or to purchase support for this
13  * software, please contact iptel.org by e-mail at the following addresses:
14  *    info@iptel.org
15  *
16  * ser is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
24  */
25 
26 #ifndef __SUBSCRIBER_H
27 #define __SUBSCRIBER_H
28 
29 /* Subscriber functions for notifier_domain */
30 
31 #include <presence/notifier_domain.h>
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 /* If a notifier publishing watched state registeres after subscibe
38  * call, it receives the subscription automaticaly too! */
39 /*qsa_subscription_t *subscribe(notifier_domain_t *domain,
40 		qsa_subscription_t *params);*/
41 qsa_subscription_t *subscribe(notifier_domain_t *domain,
42 		str_t *package,
43 		qsa_subscription_data_t *data);
44 
45 /** Destroys an existing subscription */
46 void unsubscribe(notifier_domain_t *domain, qsa_subscription_t *s);
47 
48 void set_subscriber_data(qsa_subscription_t *s, void *data);
49 void *get_subscriber_data(qsa_subscription_t *s);
50 
51 void clear_subscription_data(qsa_subscription_data_t *data);
52 
53 #ifdef __cplusplus
54 }
55 #endif
56 
57 #endif
58