Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

gdp / gdplogd / logd_pubsub.h @ master

History | View | Annotate | Download (1.8 KB)

1
/* vim: set ai sw=4 sts=4 ts=4 : */
2

    
3
/*
4
**  Headers for publish/subscribe model
5
**
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
**        Copyright (c) 2015-2019, Regents of the University of California.
11
**        All rights reserved.
12
**
13
**        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
**
19
**        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
**
24
**        REGENTS SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
25
**        LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
26
**        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
**        ----- END LICENSE BLOCK -----
31
*/
32

    
33
#ifndef _GDPD_PUBSUB_H_
34
#define _GDPD_PUBSUB_H_
35

    
36
// notify all subscribers of a new message
37
void                        sub_notify_all_subscribers(
38
                                                gdp_req_t *pubreq);
39

    
40
// terminate a subscription
41
void                        sub_end_subscription(gdp_req_t *req);
42

    
43
// terminate all subscriptions for a given {gcl, client, rid} tuple
44
EP_STAT                        sub_end_all_subscriptions(
45
                                                gdp_gob_t *gob,
46
                                                gdp_name_t dest,
47
                                                gdp_rid_t rid);
48

    
49
// reclaim subscription resources
50
void                        sub_reclaim_resources(gdp_chan_t *chan);
51

    
52
#endif // _GDPD_PUBSUB_H_