channel.c File Reference
Plugin that provides a Channel service.
More...
#include <assert.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "boris.h"
Go to the source code of this file.
|
Data Structures |
| struct | channel |
| struct | channel_public |
| struct | plugin_channel_class |
Defines |
| #define | CHANNEL_SEND_MAX 1024 |
| #define | DEBUG(msg,...) fprintf(stderr, "%s():%d:" msg "\n", __func__, __LINE__, __VA_ARGS__) |
Functions |
| static int | channel_add_member (struct channel *ch, struct channel_member *cm) |
| | add member to a channel.
|
| static int | channel_broadcast (struct channel *ch, struct channel_member **exclude_list, unsigned exclude_list_len, const char *fmt,...) |
| | send a message to everyone except those on exclude_list.
|
| static int | channel_delete_member (struct channel *ch, struct channel_member *cm) |
| | remove a member from a channel.
|
| static struct channel_member ** | channel_find_member (struct channel *ch, struct channel_member *cm) |
| | test for membership in a channel.
|
| static void | channel_init (struct channel *ch) |
| static int | channel_join (struct channel *ch, struct channel_member *cm) |
| | join a channel.
|
| static void | channel_part (struct channel *ch, struct channel_member *cm) |
| | leave a channel.
|
| static struct channel * | channel_public (const char *name) |
| | get a channel by numeric id.
|
| static int | channel_public_add (const char *name) |
| | define a new public channel.
|
| static struct channel_public * | channel_public_find (const char *name) |
| static int | initialize (void) |
| | Initialize the plugin.
|
| static int | is_on_list (const struct channel_member *cm, struct channel_member **exclude_list, unsigned exclude_list_len) |
| | exclude_list can only be NULL if exclude_list_len is 0.
|
| | LIST_HEAD (struct channel_public_list, struct channel_public) |
| static int | shutdown (void) |
| | Shutdown the plugin.
|
Variables |
| static struct channel_public_list | channel_public_list |
| struct plugin_channel_class | plugin_class |
| | Class for the plugin.
|
Detailed Description
Plugin that provides a Channel service.
- Author:
- Jon Mayo <jon.mayo@gmail.com>
- Date:
- 2009 Dec 27
Copyright 2009 Jon Mayo Ms-RL : See COPYING.txt for complete license text.
Definition in file channel.c.
Define Documentation
| #define CHANNEL_SEND_MAX 1024 |
| #define DEBUG |
( |
msg, |
|
|
... |
|
) |
fprintf(stderr, "%s():%d:" msg "\n", __func__, __LINE__, __VA_ARGS__) |
Function Documentation
| static int channel_broadcast |
( |
struct channel * |
ch, |
|
|
struct channel_member ** |
exclude_list, |
|
|
unsigned |
exclude_list_len, |
|
|
const char * |
fmt, |
|
|
|
... | |
|
) |
| | [static] |
send a message to everyone except those on exclude_list.
Definition at line 262 of file channel.c.
| static void channel_init |
( |
struct channel * |
ch |
) |
[static] |
| static int channel_public_add |
( |
const char * |
name |
) |
[static] |
| static struct channel_public* channel_public_find |
( |
const char * |
name |
) |
[static, read] |
| static int initialize |
( |
void |
|
) |
[static] |
exclude_list can only be NULL if exclude_list_len is 0.
Definition at line 251 of file channel.c.
| static int shutdown |
( |
void |
|
) |
[static] |
Variable Documentation
Initial value:
Class for the
plugin.
the only external symbol.
Definition at line 288 of file channel.c.