Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / gdplogd / logd_pubsub.h @ master

History | View | Annotate | Download (1.8 KB)

1 9509f13b Eric Allman
/* vim: set ai sw=4 sts=4 ts=4 : */
2
3 2e4a5d7d Eric Allman
/*
4
**  Headers for publish/subscribe model
5 055d3009 Eric Allman
**
6
**        ----- BEGIN LICENSE BLOCK -----
7
**        GDPLOGD: Log Daemon for the Global Data Plane
8
**        From the Ubiquitous Swarm Lab, 490 Cory Hall, U.C. Berkeley.
9
**
10 c87dd166 Eric Allman
**        Copyright (c) 2015-2019, Regents of the University of California.
11 6bd5476b Eric Allman
**        All rights reserved.
12 055d3009 Eric Allman
**
13 6bd5476b Eric Allman
**        Permission is hereby granted, without written agreement and without
14
**        license or royalty fees, to use, copy, modify, and distribute this
15
**        software and its documentation for any purpose, provided that the above
16
**        copyright notice and the following two paragraphs appear in all copies
17
**        of this software.
18 055d3009 Eric Allman
**
19 6bd5476b Eric Allman
**        IN NO EVENT SHALL REGENTS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
20
**        SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST
21
**        PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION,
22
**        EVEN IF REGENTS HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 055d3009 Eric Allman
**
24 6bd5476b Eric Allman
**        REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
25 055d3009 Eric Allman
**        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26 6bd5476b Eric Allman
**        FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION,
27
**        IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". REGENTS HAS NO
28
**        OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
29
**        OR MODIFICATIONS.
30 055d3009 Eric Allman
**        ----- END LICENSE BLOCK -----
31 2e4a5d7d Eric Allman
*/
32
33 9509f13b Eric Allman
#ifndef _GDPD_PUBSUB_H_
34
#define _GDPD_PUBSUB_H_
35
36 53393e9c Eric Allman
// notify all subscribers of a new message
37
void                        sub_notify_all_subscribers(
38
                                                gdp_req_t *pubreq);
39 9509f13b Eric Allman
40 2e4a5d7d Eric Allman
// terminate a subscription
41 cf05aa39 Eric Allman
void                        sub_end_subscription(gdp_req_t *req);
42
43 9c515e64 Eric Allman
// terminate all subscriptions for a given {gcl, client, rid} tuple
44
EP_STAT                        sub_end_all_subscriptions(
45 fec93aac Eric Allman
                                                gdp_gob_t *gob,
46 9c515e64 Eric Allman
                                                gdp_name_t dest,
47
                                                gdp_rid_t rid);
48 2e4a5d7d Eric Allman
49 9d11c6da Eric Allman
// reclaim subscription resources
50 cf05aa39 Eric Allman
void                        sub_reclaim_resources(gdp_chan_t *chan);
51 9d11c6da Eric Allman
52 9509f13b Eric Allman
#endif // _GDPD_PUBSUB_H_