summaryrefslogtreecommitdiff
path: root/include/hybbx/proxychat.h
blob: 74f71f273cfa493ef141660a7161280d1d5abbea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#ifndef HYBBX_PROXYCHAT_H
#define HYBBX_PROXYCHAT_H

/**
 * Inter-Main chat via mains_proxy.
 *
 * Local `/chat` stays on this Main. `/proxychat` is the mains-proxy sub-area
 * under `/chat` (or `/chat proxychat`). Only chat lines cross the mesh — no
 * user accounts or rights.
 */

#include "hybbx/types.h"

#ifdef __cplusplus
extern "C" {
#endif

struct hybbx_service;
struct hybbx_session;

/** Show proxychat area banner. */
void hybbx_proxychat_show_banner(struct hybbx_session *session);

/**
 * Post a line in proxychat (relay when mesh is active).
 */
hybbx_result_t hybbx_proxychat_post(struct hybbx_service *service,
                                    struct hybbx_session *session,
                                    const char *line);

/** Deliver a line received from a remote Main. */
void hybbx_proxychat_receive(struct hybbx_service *service,
                             const char *from_address,
                             const char *line);

#ifdef __cplusplus
}
#endif

#endif /* HYBBX_PROXYCHAT_H */
git clone -b <branch> https://cgit.mode42.com/<repo>.git
git clone -b <branch> git://cgit.mode42.com/<repo>.git

info@mode42.com