summaryrefslogtreecommitdiff
path: root/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/channel.c b/channel.c
index cdd1748..065e606 100644
--- a/channel.c
+++ b/channel.c
@@ -42,6 +42,14 @@ struct channel_file_t *channel_file_add(struct channel_t *channel, const char *p
return file;
}
+int channel_get_count() {
+ return channel_count;
+}
+
+struct channel_t *channel_get(int index) {
+ return (index < channel_count ? &channels[index] : NULL);
+}
+
void channel_free() {
for(int i = 0; i < channel_count; i++) {
free(channels[i].name);