subscriptions: DRY removal for allowed event check
[siplcs.git] / src / core / sipe-subscriptions.h
blobc27c1395e4a82e79547d478311c627d5ab158dfa
1 /**
2 * @file sipe-subscriptions.h
4 * pidgin-sipe
6 * Copyright (C) 2010-2013 SIPE Project <http://sipe.sourceforge.net/>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 /* Forward declarations */
24 struct sipe_core_private;
25 struct sip_dialog;
27 /**
28 * Subscriptions subsystem
30 void sipe_subscriptions_init(struct sipe_core_private *sipe_private);
31 void sipe_subscriptions_unsubscribe(struct sipe_core_private *sipe_private);
32 void sipe_subscriptions_destroy(struct sipe_core_private *sipe_private);
34 /**
35 * Does the server allow a subscription to a certain event?
37 * @param sipe_private SIPE core private data
38 * @param event subscription event (must not be @c NULL)
40 gboolean sipe_subscription_is_allowed(struct sipe_core_private *sipe_private,
41 const gchar *event);
44 /**
45 * Terminate subscription
47 * @param sipe_private SIPE core private data
48 * @param event subscription event to be removed (must not be @c NULL)
49 * @param who URI the subscription is associated with
51 void sipe_subscription_terminate(struct sipe_core_private *sipe_private,
52 const gchar *event,
53 const gchar *who);
55 /**
56 * Subscriptions
58 void sipe_subscribe(struct sipe_core_private *sipe_private,
59 const gchar *uri,
60 const gchar *event,
61 const gchar *accept,
62 const gchar *addheaders,
63 const gchar *body,
64 struct sip_dialog *dialog);
65 void sipe_subscribe_presence_wpending(struct sipe_core_private *sipe_private,
66 void *unused);
67 void sipe_subscribe_roaming_acl(struct sipe_core_private *sipe_private);
68 void sipe_subscribe_roaming_contacts(struct sipe_core_private *sipe_private);
69 void sipe_subscribe_roaming_provisioning(struct sipe_core_private *sipe_private);
70 void sipe_subscribe_roaming_provisioning_v2(struct sipe_core_private *sipe_private);
71 void sipe_subscribe_roaming_self(struct sipe_core_private *sipe_private);
73 void sipe_subscribe_presence_single(struct sipe_core_private *sipe_private,
74 gpointer buddy_name);
75 void sipe_subscribe_presence_batched(struct sipe_core_private *sipe_private);
76 void sipe_subscribe_presence_batched_schedule(struct sipe_core_private *sipe_private,
77 const gchar *action_name,
78 const gchar *who,
79 GSList *buddies,
80 int timeout);
81 void sipe_subscribe_poolfqdn_resource_uri(const gchar *host,
82 GSList *server,
83 struct sipe_core_private *sipe_private);