design_pattern_for_c
V 1.00
|
Implement of Flyweight design petten library API, related to PublishContent class. More...
Go to the source code of this file.
Data Structures | |
struct | subscriber_account_t |
SubscriberAccount class member definition, to get by publisher_subscribe. More... | |
struct | publish_content_t |
Functions | |
PublishContent | publish_content_new (void) |
SubscriberAccount | publish_content_subscribe (PublishContent this, int publish_type, void(*notify)(int publish_type, void *detail, void *ctx), void *ctx) |
void | publish_content_subscribe_oneshot (PublishContent this, int publish_type, void(*notify)(int publish_type, void *detail, void *ctx), void *ctx) |
void | publish_content_unsubscribe (PublishContent this, SubscriberAccount account) |
void | publish_content_publish (PublishContent this, int publish_type, void *detail) |
void | publish_content_free (PublishContent this) |
PublishContent private method | |
#define | PUBLISH_CONTENT_LOCK(content) DPUTIL_LOCK(&(content->lock)) |
#define | PUBLISH_CONTENT_UNLOCK DPUTIL_UNLOCK |
static void | publish_content_push_subscriber (PublishContent this, SubscriberAccount account) |
push subscriber More... | |
static void | publish_content_pull_subscriber (PublishContent this, SubscriberAccount account) |
pull subscriber More... | |
static SubscriberAccount | publish_content_pop_subscriber (PublishContent this) |
pop subscriber More... | |
Implement of Flyweight design petten library API, related to PublishContent class.
Definition in file publish_content.c.
#define PUBLISH_CONTENT_LOCK | ( | content | ) | DPUTIL_LOCK(&(content->lock)) |
Definition at line 42 of file publish_content.c.
#define PUBLISH_CONTENT_UNLOCK DPUTIL_UNLOCK |
Definition at line 43 of file publish_content.c.
void publish_content_free | ( | PublishContent | this | ) |
Definition at line 116 of file publish_content.c.
PublishContent publish_content_new | ( | void | ) |
|
inlinestatic |
pop subscriber
Definition at line 37 of file publish_content.c.
void publish_content_publish | ( | PublishContent | this, |
int | publish_type, | ||
void * | detail | ||
) |
Definition at line 91 of file publish_content.c.
|
inlinestatic |
pull subscriber
Definition at line 32 of file publish_content.c.
|
inlinestatic |
push subscriber
Definition at line 28 of file publish_content.c.
SubscriberAccount publish_content_subscribe | ( | PublishContent | this, |
int | publish_type, | ||
void(*)(int publish_type, void *detail, void *ctx) | notify, | ||
void * | ctx | ||
) |
Definition at line 55 of file publish_content.c.
void publish_content_subscribe_oneshot | ( | PublishContent | this, |
int | publish_type, | ||
void(*)(int publish_type, void *detail, void *ctx) | notify, | ||
void * | ctx | ||
) |
Definition at line 70 of file publish_content.c.
void publish_content_unsubscribe | ( | PublishContent | this, |
SubscriberAccount | account | ||
) |
Definition at line 84 of file publish_content.c.