annotate libnnchat.h @ 62:ff5d74f0d428

Moved some functions to "libnnchat".
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 11 Nov 2008 21:57:51 +0200
parents
children 6a3a917303e4
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
62
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * NNChat - Custom chat client for NewbieNudes.com chatrooms
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 * Written by Matti 'ccr' Hämäläinen
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 * (C) Copyright 2008 Tecnic Software productions (TNSP)
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 */
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 #ifndef LIBNNCHAT_H
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 #define LIBNNCHAT_H
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 #include <stdio.h>
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 #include <unistd.h>
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 #include <sys/socket.h>
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 #include <sys/types.h>
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 #include <arpa/inet.h>
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 #include <sys/time.h>
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 #include <netdb.h>
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 #include <errno.h>
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 #include "th_string.h"
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 #define SET_BUFSIZE (4096)
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 #define SET_ALLOC_SIZE (128)
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 int openConnection(struct in_addr *addr, const int port);
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 void closeConnection(const int sock);
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 BOOL sendToSocket(const int sock, char *buf, const size_t bufLen);
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 BOOL sendUserMsg(const int sock, const char *user, const char *fmt, ...);
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 char *encodeStr1(const char *str);
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 char *decodeStr1(const char *str);
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 char *encodeStr2(const char *str);
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 char *decodeStr2(const char *str);
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 char *stripXMLTags(const char *str);
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34
ff5d74f0d428 Moved some functions to "libnnchat".
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 #endif