2 * Dolda Connect - Modular multiuser Direct Connect-style client
3 * Copyright (C) 2004 Fredrik Tolf (fredrik@dolda2000.com)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
43 void (*connect)(struct fnetnode *fn);
44 void (*destroy)(struct fnetnode *fn);
45 int (*setnick)(struct fnetnode *fn, wchar_t *newnick);
46 int (*reqconn)(struct fnetpeer *peer);
47 int (*sendchat)(struct fnetnode *fn, int public, wchar_t *to, wchar_t *string);
48 int (*search)(struct fnetnode *fn, struct search *srch, struct srchfnnlist *ln);
49 wchar_t *(*filebasename)(wchar_t *filename);
54 struct fnetpeerdatum *next, *prev;
62 struct fnetpeerdatum *datum;
73 struct fnetpeer *next, *prev;
87 struct fnetpeerdi *peerdi;
92 struct fnetnode *next, *prev;
97 time_t srchwait, lastsrch;
102 struct fnetpeerdatum *peerdata;
103 struct fnetpeer *peers;
104 CBCHAIN(fnetnode_ac, struct fnetnode *fn, wchar_t *attrib);
105 CBCHAIN(fnetnode_chat, struct fnetnode *fn, int public, wchar_t *name, wchar_t *peer, wchar_t *string);
106 CBCHAIN(fnetnode_unlink, struct fnetnode *fn);
107 CBCHAIN(fnetnode_destroy, struct fnetnode *fn);
112 void regfnet(struct fnet *fnet);
113 void fnetsetname(struct fnetnode *fn, wchar_t *newname);
114 void fnetsetstate(struct fnetnode *fn, int newstate);
115 int fnetsetnick(struct fnetnode *fn, wchar_t *newnick);
116 struct fnet *findfnet(wchar_t *name);
117 struct fnetnode *fnetinitconnect(wchar_t *name, char *addr);
118 void linkfnetnode(struct fnetnode *fn);
119 void unlinkfnetnode(struct fnetnode *fn);
120 void getfnetnode(struct fnetnode *fn);
121 void putfnetnode(struct fnetnode *fn);
122 void killfnetnode(struct fnetnode *fn);
123 struct fnetpeer *fnetaddpeer(struct fnetnode *fn, wchar_t *id, wchar_t *nick);
124 void fnetdelpeer(struct fnetpeer *peer);
125 struct fnetpeer *fnetfindpeer(struct fnetnode *fn, wchar_t *id);
126 void fnetpeersetstr(struct fnetpeer *peer, wchar_t *id, wchar_t *value);
127 void fnetpeersetnum(struct fnetpeer *peer, wchar_t *id, int value);
128 void fnetpeersetlnum(struct fnetpeer *peer, wchar_t *id, long long value);
129 void fnetpeerunset(struct fnetpeer *peer, wchar_t *id);
130 struct fnetnode *findfnetnode(int id);
131 void fnethandlechat(struct fnetnode *fn, int public, wchar_t *name, wchar_t *peer, wchar_t *chat);
132 int fnetsendchat(struct fnetnode *fn, int public, wchar_t *to, wchar_t *string);
133 int fnetsearch(struct fnetnode *fn, struct search *srch, struct srchfnnlist *ln);
135 extern struct fnetnode *fnetnodes;
136 EGCBCHAIN(newfncb, struct fnetnode *);