#include <stdint.h>
#include "temu-c/Support/Attributes.h"
Go to the source code of this file.
|
TEMU_API int64_t | temu_publishNotification (const char *NotName, void *Obj) |
|
TEMU_API int | temu_subscribeNotification (const char *NotName, void *Source, void *Arg, temu_NotificationHandler NotFunc) |
|
TEMU_API int | temu_unsubscribeNotification (const char *NotName, void *Source, temu_NotificationHandler NotFunc) |
|
TEMU_API int | temu_unsubscribeNotificationArg (const char *NotName, void *Source, temu_NotificationHandler NotFunc, void *Arg) |
|
TEMU_API void | temu_notify (int64_t Id, void *NotInfo) |
|
typedef void(* temu_NotificationHandler)(void *Arg, void *Source, void *NotInfo) |
TEMU_API 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.
- Parameters
-
Id | Notification ID |
NotInfo | Ponter to pass to notification handlers |
TEMU_API 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
- Parameters
-
NotName | Name of the notification |
Obj | Pointer to the object |
- Returns
- Notification ID of the published event.
Install notification functions for the given event generated by source
- Parameters
-
NotName | Name of the notification |
Source | If source is NULL, the event subscriber will be notified by all the sources for the given name. |
Arg | Context argument to be passed to the callback notification function |
NotFunc | The callback function on notification |
Remove notification handler for the given name and source. Note that this function runs in O(N) time. It is not meant for being used in performance critical code.
- Parameters
-
NotName | Name of the notification |
Source | If source is NULL, the event subscriber will be notified by all the sources for the given name. |
NotFunc | The callback function to be called on notification |
Remove notification handler for the given name, source and arg. Note that this function runs in O(N) time. It is not meant for being used in performance critical code.
- Parameters
-
NotName | Name of the notification |
Source | If source is NULL, the event subscriber will be notified by all the sources for the given name. |
NotFunc | The callback function to be called on notification |
Arg | Context argument to be passed to the callback notification function |
- Returns
- zero on success, otherwise non-zero