QuickIO  0.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Functions
sub.h File Reference

Controls the memory around subscriptions. More...

#include "quickio.h"

Go to the source code of this file.

Classes

struct  subscription
 Events are what are located at the paths, whereas subscriptions are what are located at ev_path + ev_extra (ev_extra may == ""), and these are what you can actually broadcast and send events to. More...
 

Functions

struct subscriptionsub_get (struct event *ev, const gchar *ev_extra)
 Get a subscription. More...
 
struct subscriptionsub_ref (struct subscription *sub)
 Increase the reference count on the subscription. More...
 
void sub_unref (struct subscription *sub)
 Release a reference to the subscription, cleaning it up if there are no more references. More...
 
void sub_init ()
 Get subs ready to run.
 

Detailed Description

Controls the memory around subscriptions.

Author
Andrew Stone andre.nosp@m.w@cl.nosp@m.ovar..nosp@m.com

Function Documentation

struct subscription* sub_get ( struct event ev,
const gchar *  ev_extra 
)

Get a subscription.

If the subscription does not exist, it is created.

Parameters
evThe event to get the subscription from
ev_extraAny extra path segments for the subscription
Returns
A reference to the subscription. When done, call sub_unref().
struct subscription* sub_ref ( struct subscription sub)

Increase the reference count on the subscription.

Parameters
subThe subscription you're done with.
void sub_unref ( struct subscription sub)

Release a reference to the subscription, cleaning it up if there are no more references.

Parameters
subThe subscription you're done with.