T-EMU  2
The Terma Emulator
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Typedefs | Functions
Notifications.h File Reference
#include <stdint.h>
Include dependency graph for Notifications.h:

Go to the source code of this file.

Typedefs

typedef void(* temu_NotificationHandler )(void *Arg, void *Source, void *NotInfo)
 

Functions

int64_t temu_publishNotification (const char *NotName, void *Obj)
 
int temu_subscribeNotification (const char *NotName, void *Source, void *Arg, temu_NotificationHandler NotFunc)
 Install notification functions for the given event generated by source. More...
 
int temu_unsubscribeNotification (const char *NotName, void *Source, temu_NotificationHandler NotFunc)
 
void temu_notify (int64_t Id, void *NotInfo)
 

Typedef Documentation

typedef void(* temu_NotificationHandler)(void *Arg, void *Source, void *NotInfo)

Definition at line 27 of file Notifications.h.

Function Documentation

void temu_notify ( int64_t  Id,
void *  NotInfo 
)

Call event subscriber, EvInfo is a per event specific struct the event handler must cast this to the appropriate type.

int64_t temu_publishNotification ( const char *  NotName,
void *  Obj 
)

Publish a notification source A notification source is identified by an event name and an object pointer

Returns
Notification ID of the published event.
int temu_subscribeNotification ( const char *  NotName,
void *  Source,
void *  Arg,
temu_NotificationHandler  NotFunc 
)

Install notification functions for the given event generated by source.

Parameters
SourceIf source is NULL, the event subscriber will be notified by all the sources for the given name.
int temu_unsubscribeNotification ( const char *  NotName,
void *  Source,
temu_NotificationHandler  NotFunc 
)

Remove notification handler for the given name and source. Note that this function runs in O(N) time. It is not ment for being used in performance critical code.