Changeset 4320:024275201dee in roaraudio
- Timestamp:
- 09/07/10 15:55:11 (14 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroar/notify.h
r4317 r4320 67 67 #define roar_notify_core_free(x) roar_notify_core_unref((x)) 68 68 69 int roar_notify_core_new_global(ssize_t lists); 70 69 71 int roar_notify_core_register_proxy(struct roar_notify_core * core, void (*cb)(struct roar_notify_core * core, struct roar_event * event, void * userdata), void * userdata); 70 72 -
libroar/notify.c
r4316 r4320 58 58 }; 59 59 60 #define _CKRCORE(ret) if ( core == NULL ) { roar_errno = ROAR_ERROR_INVAL; return (ret); } 60 static struct roar_notify_core * _libroar_notify_core = NULL; 61 62 #define _CKRCORE(ret) if ( core == NULL ) { if ( _libroar_notify_core == NULL ) { roar_errno = ROAR_ERROR_INVAL; return (ret); } else { core = _libroar_notify_core; } } 61 63 #define _CKICORE() _CKRCORE(-1) 62 64 … … 163 165 } 164 166 167 int roar_notify_core_new_global(ssize_t lists) { 168 if ( _libroar_notify_core != NULL ) { 169 roar_errno = ROAR_ERROR_INVAL; 170 return -1; 171 } 172 173 if ( (_libroar_notify_core = roar_notify_core_new(lists)) == NULL ) 174 return -1; 175 176 return 0; 177 } 178 165 179 int roar_notify_core_register_proxy(struct roar_notify_core * core, void (*cb)(struct roar_notify_core * core, struct roar_event * event, void * userdata), void * userdata) { 166 180 _CKICORE();
Note: See TracChangeset
for help on using the changeset viewer.