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,
53 IdData(int cid, int sid, unsigned int ip){
59 int getChannelId(){return channel_id;};
60 int getServentId(){return servent_id;};
61 unsigned int getIpAddr(){return ip_addr;};
74 // unsigned int syncpos;
80 unsigned int totalRelays;
81 unsigned int totalListeners;
83 // char ver_ex_prefix[2];
96 unsigned int lastSkipTime;
97 unsigned int lastSkipCount;
111 void setData(Servent *s, ChanHit *hit, unsigned int listeners, unsigned int relays, bool infoFlg);
112 bool getInfoFlg(){return infoFlg;}
113 ChanHit *getChanHit(){return &chanHit;};
114 int getStatus(){return status;};
115 Host getHost(){return host;};
117 int getServentId(){return servent_id;};
119 bool getEnableFlg(){return EnableFlg;};
120 void setEnableFlg(bool f){EnableFlg = f;};
121 ServentData *getNextData(){return next;};
122 void setNextData(ServentData *s){next = s;};
123 bool getSelected(){return selected;};
124 void setSelected(bool f){selected = f; if (!f){posX=0;posY=0;}};
125 int getWidth(){return width;};
126 void setWidth(int w){width = w;};
127 int getHeight(){return height;};
128 void setHeight(int h){height = h;};
129 String getName(){return hostname;};
130 void setName(String n){hostname = n;};
132 int drawServent(Gdiplus::Graphics *g, int x, int y);
134 bool checkDown(int x, int y);
144 unsigned int lastPlayStart;
153 unsigned int lastSkipTime;
154 unsigned int skipCount;
164 ServentData *serventDataTop;
176 serventDataTop = NULL;
179 int drawChannel(Gdiplus::Graphics *g, int x, int y);
181 void setData(Channel *);
182 int getChannelId(){return channel_id;};
183 char* getName(){return &(name[0]);};
184 int getBitRate(){return bitRate;};
185 bool isStayConnected(){return stayConnected;};
186 bool isTracker(){return bTracker;};
187 int getStatus(){return status;};
188 unsigned int getLastSkipTime(){return lastSkipTime;};
190 int getTotalListeners(){return totalListeners;};
191 int getTotalRelays(){return totalRelays;};
192 int getLocalListeners(){return localListeners;};
193 int getLocalRelays(){return localRelays;};
195 bool getEnableFlg(){return EnableFlg;};
196 void setEnableFlg(bool flg){EnableFlg = flg;};
197 ChannelData *getNextData(){return next;};
198 void setNextData(ChannelData* cd){next = cd;};
200 int getPosX(){return posX;};
201 void setPosX(int x){posX = x;}
202 int getPosY(){return posY;};
203 void setPosY(int y){posY = y;};
204 int getWidth(){return width;};
205 void setWidth(int w){width = w;};
206 int getHeight(){return height;};
207 void setHeight(int h){height = h;};
208 bool isSelected(){return selected;};
209 void setSelected(bool sel){selected = sel;};
210 bool getOpenFlg(){return openFlg;};
211 void setOpenFlg(bool b){openFlg = b;};
213 ServentData* getServentDataTop(){return serventDataTop;};
214 ServentData* findServentData(int servent_id);
215 void addServentData(ServentData *sd);
216 void deleteDisableServents();
218 bool setName(int servent_id, String name);
219 int getServentCount();
221 bool checkDown(int x, int y);