1 // ------------------------------------------------
6 // (c) 2002 peercast.org
7 // ------------------------------------------------
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
17 // ------------------------------------------------
26 extern LRESULT CALLBACK GUIProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
27 extern void ADDLOG(const char *str,int id,bool sel,void *data, LogBuffer::TYPE type);
29 extern String iniFileName;
35 WM_INITSETTINGS = WM_USER,
52 IdData(int cid, int sid, unsigned int ip){
58 int getChannelId(){return channel_id;};
59 int getServentId(){return servent_id;};
60 unsigned int getIpAddr(){return ip_addr;};
73 // unsigned int syncpos;
79 unsigned int totalRelays;
80 unsigned int totalListeners;
82 // char ver_ex_prefix[2];
95 unsigned int lastSkipTime;
96 unsigned int lastSkipCount;
110 void setData(Servent *s, ChanHit *hit, unsigned int listeners, unsigned int relays, bool infoFlg);
111 bool getInfoFlg(){return infoFlg;}
112 ChanHit *getChanHit(){return &chanHit;};
113 int getStatus(){return status;};
114 Host getHost(){return host;};
116 int getServentId(){return servent_id;};
118 bool getEnableFlg(){return EnableFlg;};
119 void setEnableFlg(bool f){EnableFlg = f;};
120 ServentData *getNextData(){return next;};
121 void setNextData(ServentData *s){next = s;};
122 bool getSelected(){return selected;};
123 void setSelected(bool f){selected = f; if (!f){posX=0;posY=0;}};
124 int getWidth(){return width;};
125 void setWidth(int w){width = w;};
126 int getHeight(){return height;};
127 void setHeight(int h){height = h;};
128 String getName(){return hostname;};
129 void setName(String n){hostname = n;};
131 int drawServent(Gdiplus::Graphics *g, int x, int y);
133 bool checkDown(int x, int y);
143 unsigned int lastPlayStart;
152 unsigned int lastSkipTime;
153 unsigned int skipCount;
163 ServentData *serventDataTop;
175 serventDataTop = NULL;
178 int drawChannel(Gdiplus::Graphics *g, int x, int y);
180 void setData(Channel *);
181 int getChannelId(){return channel_id;};
182 char* getName(){return &(name[0]);};
183 int getBitRate(){return bitRate;};
184 bool isStayConnected(){return stayConnected;};
185 bool isTracker(){return bTracker;};
186 int getStatus(){return status;};
187 unsigned int getLastSkipTime(){return lastSkipTime;};
189 int getTotalListeners(){return totalListeners;};
190 int getTotalRelays(){return totalRelays;};
191 int getLocalListeners(){return localListeners;};
192 int getLocalRelays(){return localRelays;};
194 bool getEnableFlg(){return EnableFlg;};
195 void setEnableFlg(bool flg){EnableFlg = flg;};
196 ChannelData *getNextData(){return next;};
197 void setNextData(ChannelData* cd){next = cd;};
199 int getPosX(){return posX;};
200 void setPosX(int x){posX = x;}
201 int getPosY(){return posY;};
202 void setPosY(int y){posY = y;};
203 int getWidth(){return width;};
204 void setWidth(int w){width = w;};
205 int getHeight(){return height;};
206 void setHeight(int h){height = h;};
207 bool isSelected(){return selected;};
208 void setSelected(bool sel){selected = sel;};
209 bool getOpenFlg(){return openFlg;};
210 void setOpenFlg(bool b){openFlg = b;};
212 ServentData* getServentDataTop(){return serventDataTop;};
213 ServentData* findServentData(int servent_id);
214 void addServentData(ServentData *sd);
215 void deleteDisableServents();
217 bool setName(int servent_id, String name);
218 int getServentCount();
220 bool checkDown(int x, int y);