Remove do-nothing command and add warning about it
[amule.git] / src / GuiEvents.h
blob625472a6eb45c95345d32765d190ea71e5c2a34a
1 //
2 // This file is part of the aMule Project.
3 //
4 // Copyright (c) 2004-2011 aMule Team ( admin@amule.org / http://www.amule.org )
5 // Copyright (c) 2004-2011 Angel Vidal ( kry@amule.org )
6 // Copyright (c) 2004-2011 Froenchenko Leonid (lfroen@users.sourceforge.net)
7 //
8 // Any parts of this program derived from the xMule, lMule or eMule project,
9 // or contributed by third-party developers are copyrighted by their
10 // respective authors.
12 // This program is free software; you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation; either version 2 of the License, or
15 // (at your option) any later version.
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
27 #ifndef GUIEVENTS_H
28 #define GUIEVENTS_H
30 #include <wx/event.h>
32 #include "Types.h"
33 #include "Constants.h"
34 #define __need_convertinfo // We need only the ConvertInfo struct from PartFileConvert.h
35 #include "PartFileConvert.h"
37 class CKnownFile;
38 class CSearchFile;
39 class CPartFile;
40 class CServer;
41 class CFriend;
42 class CClientRef;
43 class CLibSocket;
44 class CLibSocketServer;
45 class CMuleUDPSocket;
48 DECLARE_LOCAL_EVENT_TYPE(MULE_EVT_NOTIFY, -1)
51 /**
52 * This namespaces contains a number of functions and classes
53 * related to defered function calls, allowing a notification
54 * call to be delayed till it can be initiated from the main
55 * thread.
57 namespace MuleNotify
59 /**
60 * Creates a deep copy of the object passed.
62 * Note that this function should be overwritten as
63 * needed. See the wxString version below.
65 template <class ValueType>
66 inline ValueType DeepCopy(const ValueType& value)
68 return ValueType(value);
71 /** Special DeepCopy for wxString, which uses reference counting. */
72 inline wxString DeepCopy(const wxString& value)
74 return wxString(value.c_str(), value.Length());
78 ////////////////////////////////////////////////////////////
79 // Notification handlers
81 // These functions should not be called directly, but
82 // through the Notify_*, etc. macros.
85 void SharedFilesShowFile(CKnownFile* file);
86 void SharedFilesRemoveFile(CKnownFile* file);
87 void SharedFilesRemoveAllFiles();
88 void SharedFilesShowFileList();
89 void SharedFilesUpdateItem(CKnownFile* file);
91 void DownloadCtrlUpdateItem(const void* item);
92 void SourceCtrlUpdateSource(uint32 source, SourceItemType type);
93 void DownloadCtrlAddFile(CPartFile* file);
94 void SourceCtrlAddSource(CPartFile* owner, CClientRef source, SourceItemType type);
95 void DownloadCtrlRemoveFile(CPartFile* file);
96 void SourceCtrlRemoveSource(uint32 source, const CPartFile* owner);
97 void DownloadCtrlHideSource(CPartFile* file);
98 void DownloadCtrlSort();
99 void DownloadCtrlDoItemSelectionChanged();
101 void SharedCtrlAddClient(CKnownFile* owner, CClientRef client, SourceItemType type);
102 void SharedCtrlRefreshClient(uint32 client, SourceItemType type);
103 void SharedCtrlRemoveClient(uint32 client, const CKnownFile* owner);
105 void ServerAdd(CServer* server);
106 void ServerRemove(CServer* server);
107 void ServerRemoveDead();
108 void ServerRemoveAll();
109 void ServerHighlight(CServer* server, bool highlight);
110 void ServerRefresh(CServer* server);
111 void ServerFreeze();
112 void ServerThaw();
113 void ServerUpdateED2KInfo();
114 void ServerUpdateKadKInfo();
116 void SearchCancel();
117 void SearchLocalEnd();
118 void KadSearchEnd(uint32 id);
119 void Search_Update_Sources(CSearchFile* result);
120 void Search_Add_Result(CSearchFile* result);
122 void ChatUpdateFriend(CFriend* Friend);
123 void ChatRemoveFriend(CFriend* Friend);
124 void ChatConnResult(bool success, uint64 id, wxString message);
125 void ChatProcessMsg(uint64 sender, wxString message);
126 void ChatSendCaptcha(wxString captcha, uint64 to_id);
128 void ShowConnState(long state);
129 void ShowUserCount(wxString str);
130 void ShowUpdateCatTabTitles();
131 void ShowGUI();
133 void CategoryAdded();
134 void CategoryUpdate(uint32 cat);
135 void CategoryDelete(uint32 cat);
137 void NodesURLChanged(wxString url);
138 void ServersURLChanged(wxString url);
140 // Partfile conversion: Core -> GUI
141 void ConvertUpdateProgress(float percent, wxString label, wxString header);
142 void ConvertUpdateJobInfo(ConvertInfo info);
143 void ConvertRemoveJobInfo(unsigned id);
144 void ConvertClearInfos();
145 // Partfile conversion: GUI -> Core
146 void ConvertRemoveJob(unsigned id);
147 void ConvertRetryJob(unsigned id);
148 void ConvertReaddAllJobs();
151 // GUI -> core notification
154 void PartFile_Swap_A4AF(CPartFile* file);
155 void PartFile_Swap_A4AF_Auto(CPartFile* file);
156 void PartFile_Swap_A4AF_Others(CPartFile* file);
157 void PartFile_Pause(CPartFile* file);
158 void PartFile_Resume(CPartFile* file);
159 void PartFile_Stop(CPartFile* file);
160 void PartFile_PrioAuto(CPartFile* file, bool val);
161 void PartFile_PrioSet(CPartFile* file, uint8 newDownPriority, bool bSave);
162 void PartFile_Delete(CPartFile* file);
163 void PartFile_SetCat(CPartFile* file, uint32 val);
165 void KnownFile_Up_Prio_Set(CKnownFile* file, uint8 val);
166 void KnownFile_Up_Prio_Auto(CKnownFile* file);
167 void KnownFile_Comment_Set(CKnownFile* file, wxString comment, int8 rating);
169 void Search_Add_Download(CSearchFile* result, uint8 category);
170 void Search_Update_Progress(uint32 value);
172 void Download_Set_Cat_Prio(uint8 cat, uint8 newprio);
173 void Download_Set_Cat_Status(uint8 cat, int newstatus);
175 void Upload_Resort_Queue();
177 void Client_Delete(CClientRef client);
180 // core internal notifications
183 // ASIO sockets
184 void LibSocketConnect(CLibSocket * socket, int error);
185 void LibSocketSend(CLibSocket * socket, int error);
186 void LibSocketReceive(CLibSocket * socket, int error);
187 void LibSocketLost(CLibSocket * socket);
188 void LibSocketDestroy(CLibSocket * socket);
189 void ProxySocketEvent(CLibSocket * socket, int evt);
190 void ServerTCPAccept(CLibSocketServer * socketServer);
191 void UDPSocketSend(CMuleUDPSocket * socket);
192 void UDPSocketReceive(CMuleUDPSocket * socket);
195 // Notifications that always create an event
197 void IPFilter_Reload();
198 void IPFilter_Update(wxString url);
200 ////////////////////////////////////////////////////////////
201 // Notification utilities
204 * The base class of the functions.
206 * This class allows the the notification call to be executed
207 * without knowing the exact specifics of a given functor.
209 class CMuleNotiferBase
211 public:
212 /** The constructor does nothing. */
213 CMuleNotiferBase() {};
214 /** The destructor is virtual since we will be deleting pointers to this type. */
215 virtual ~CMuleNotiferBase() {};
217 /** Executes the actual notification call. */
218 virtual void Notify() const = 0;
219 /** Returns a copy of the functor (function + arguments). */
220 virtual CMuleNotiferBase* Clone() const = 0;
224 /** Notification functor for functions taking no arguments. */
225 class CMuleNotifier0 : public CMuleNotiferBase
227 public:
228 typedef void (*FuncType)();
230 /** Creates a functor from the given function. */
231 CMuleNotifier0(FuncType func)
232 : m_func(func) {}
234 /** @see CMuleNotifierBase::Notify */
235 virtual void Notify() const {
236 m_func();
239 /** @see CMuleNotifierBase::Clone */
240 virtual CMuleNotiferBase* Clone() const {
241 return new CMuleNotifier0(m_func);
244 private:
245 FuncType m_func;
249 /** Notification functor for functions taking 1 arguments. */
250 template <typename ARG>
251 class CMuleNotifier1 : public CMuleNotiferBase
253 public:
254 typedef void (*FuncType)(ARG);
256 /** Creates a functor from the given function and arguments. */
257 CMuleNotifier1(FuncType func, ARG arg)
258 : m_func(func),
259 m_arg(DeepCopy(arg))
262 /** @see CMuleNotifierBase::Notify */
263 virtual void Notify() const {
264 m_func(m_arg);
267 /** @see CMuleNotifierBase::Clone */
268 virtual CMuleNotiferBase* Clone() const {
269 return new CMuleNotifier1<ARG>(m_func, m_arg);
272 private:
273 FuncType m_func;
274 ARG m_arg;
278 /** Notification functor for functions taking 2 arguments. */
279 template <typename ARG_1, typename ARG_2>
280 class CMuleNotifier2 : public CMuleNotiferBase
282 public:
283 typedef void (*FuncType)(ARG_1, ARG_2);
285 /** Creates a functor from the given function and arguments. */
286 CMuleNotifier2(FuncType func, ARG_1 arg1, ARG_2 arg2)
287 : m_func(func),
288 m_arg1(DeepCopy(arg1)),
289 m_arg2(DeepCopy(arg2))
292 /** @see CMuleNotifierBase:: Notify */
293 virtual void Notify() const {
294 m_func(m_arg1, m_arg2);
297 /** @see CMuleNotifierBase::Clone */
298 virtual CMuleNotiferBase* Clone() const {
299 return new CMuleNotifier2<ARG_1, ARG_2>(m_func, m_arg1, m_arg2);
302 private:
303 FuncType m_func;
304 ARG_1 m_arg1;
305 ARG_2 m_arg2;
309 /** Notification functor for functions taking 3 arguments. */
310 template <typename ARG_1, typename ARG_2, typename ARG_3>
311 class CMuleNotifier3 : public CMuleNotiferBase
313 public:
314 typedef void (*FuncType)(ARG_1, ARG_2, ARG_3);
316 /** Creates a functor from the given function and arguments. */
317 CMuleNotifier3(FuncType func, ARG_1 arg1, ARG_2 arg2, ARG_3 arg3)
318 : m_func(func),
319 m_arg1(DeepCopy(arg1)),
320 m_arg2(DeepCopy(arg2)),
321 m_arg3(DeepCopy(arg3))
324 /** @see CMuleNotifierBase:: Notify */
325 virtual void Notify() const {
326 m_func(m_arg1, m_arg2, m_arg3);
329 /** @see CMuleNotifierBase::Clone */
330 virtual CMuleNotiferBase* Clone() const {
331 return new CMuleNotifier3<ARG_1, ARG_2, ARG_3>(m_func, m_arg1, m_arg2, m_arg3);
334 private:
335 FuncType m_func;
336 ARG_1 m_arg1;
337 ARG_2 m_arg2;
338 ARG_3 m_arg3;
343 * This event is sent when a worker-thread makes use of a notify-macro.
345 * This insures that all notifications are executed on the main thread,
346 * thereby improving overall threadsafety. The events are currently
347 * sent to wxTheApp.
349 class CMuleGUIEvent : public wxEvent
351 public:
352 /** Takes ownership a notifier functor. */
353 CMuleGUIEvent(CMuleNotiferBase* ntf)
354 : wxEvent(-1, MULE_EVT_NOTIFY)
355 , m_functor(ntf)
357 wxASSERT(m_functor);
360 /** Destructor, frees the functor object. */
361 virtual ~CMuleGUIEvent() {
362 delete m_functor;
365 /** Executes the notification. */
366 void Notify() const {
367 m_functor->Notify();
370 /** @see wxEvent::Clone */
371 virtual wxEvent* Clone() const {
372 return new CMuleGUIEvent(m_functor->Clone());
375 private:
376 /** Not copyable. */
377 CMuleGUIEvent(const CMuleGUIEvent&);
378 /** Not assignable. */
379 CMuleGUIEvent& operator=(const CMuleGUIEvent&);
381 //! The actual functor object,
382 CMuleNotiferBase* m_functor;
387 * This function will execute or queue a given notification functor.
389 * If the caller is the main thread, the functor is executed immediatly,
390 * thus acting like a regular function call. OTOH, if the caller is a
391 * worker thread, the functor is cloned and sent via an event to
392 * wxTheApp.
394 void HandleNotification(const CMuleNotiferBase& ntf);
397 * These functions take a function pointer and a set of arguments,
398 * matching those of the function-pointer. A functor is created
399 * from these and either executed immediatly, or sent as an event
400 * in the case of non-main threads calling the functions.
402 * Note that the return-value of the function must be void.
404 * IMPORTANT: Note that the functions passed to DoNotify must not
405 * take arguments via references, since this causes the functors
406 * to store references to the arguments, rather than a copy and
407 * thus ends up with dangling references.
409 //@{
410 inline void DoNotify(void (*func)()) {
411 HandleNotification(CMuleNotifier0(func));
413 template <typename A1A, typename A1B>
414 inline void DoNotify(void (*func)(A1A), A1B arg1) {
415 HandleNotification(CMuleNotifier1<A1A>(func, arg1));
417 template <typename A1A, typename A1B, typename A2A, typename A2B>
418 inline void DoNotify(void (*func)(A1A, A2A), A1B arg1, A2B arg2) {
419 HandleNotification(CMuleNotifier2<A1A, A2A>(func, arg1, arg2));
421 template <typename A1A, typename A1B, typename A2A, typename A2B, typename A3A, typename A3B>
422 inline void DoNotify(void (*func)(A1A, A2A, A3A), A1B arg1, A2B arg2, A3B arg3) {
423 HandleNotification(CMuleNotifier3<A1A, A2A, A3A>(func, arg1, arg2, arg3));
425 //@}
428 * The same as above, but these functions will always send an event,
429 * even from the main thread.
431 void HandleNotificationAlways(const CMuleNotiferBase& ntf);
433 inline void DoNotifyAlways(void (*func)()) {
434 HandleNotificationAlways(CMuleNotifier0(func));
436 template <typename A1A, typename A1B>
437 inline void DoNotifyAlways(void (*func)(A1A), A1B arg1) {
438 HandleNotificationAlways(CMuleNotifier1<A1A>(func, arg1));
440 template <typename A1A, typename A1B, typename A2A, typename A2B>
441 inline void DoNotifyAlways(void (*func)(A1A, A2A), A1B arg1, A2B arg2) {
442 HandleNotificationAlways(CMuleNotifier2<A1A, A2A>(func, arg1, arg2));
444 template <typename A1A, typename A1B, typename A2A, typename A2B, typename A3A, typename A3B>
445 inline void DoNotifyAlways(void (*func)(A1A, A2A, A3A), A1B arg1, A2B arg2, A3B arg3) {
446 HandleNotificationAlways(CMuleNotifier3<A1A, A2A, A3A>(func, arg1, arg2, arg3));
451 //! Placing CMuleGUIEvent in the global namespace.
452 using MuleNotify::CMuleGUIEvent;
454 //! The event-handler type that takes a CMuleGUIEvent.
455 typedef void (wxEvtHandler::*MuleNotifyEventFunction)(CMuleGUIEvent&);
457 //! Event-handler for completed hashings of new shared files and partfiles.
458 #define EVT_MULE_NOTIFY(func) \
459 DECLARE_EVENT_TABLE_ENTRY(MULE_EVT_NOTIFY, -1, -1, \
460 (wxObjectEventFunction) (wxEventFunction) \
461 wxStaticCastEvent(MuleNotifyEventFunction, &func), (wxObject*) NULL),
466 // SharedFilesCtrl
467 #define Notify_SharedFilesShowFile(file) MuleNotify::DoNotify(&MuleNotify::SharedFilesShowFile, file)
468 #define Notify_SharedFilesRemoveFile(file) MuleNotify::DoNotify(&MuleNotify::SharedFilesRemoveFile, file)
469 #define Notify_SharedFilesRemoveAllItems() MuleNotify::DoNotify(&MuleNotify::SharedFilesRemoveAllFiles)
470 #define Notify_SharedFilesShowFileList() MuleNotify::DoNotify(&MuleNotify::SharedFilesShowFileList)
471 #define Notify_SharedFilesSort() MuleNotify::DoNotify(&MuleNotify::SharedFilesSort)
472 #define Notify_SharedFilesUpdateItem(file) MuleNotify::DoNotify(&MuleNotify::SharedFilesUpdateItem, file)
474 // download ctrl
475 #define Notify_DownloadCtrlUpdateItem(ptr) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlUpdateItem, ptr)
476 #define Notify_DownloadCtrlAddFile(file) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlAddFile, file)
477 #define Notify_DownloadCtrlRemoveFile(file) MuleNotify::DoNotify(&MuleNotify::DownloadCtrlRemoveFile, file)
478 #define Notify_DownloadCtrlSort() MuleNotify::DoNotify(&MuleNotify::DownloadCtrlSort)
479 #define Notify_DownloadCtrlDoItemSelectionChanged() MuleNotify::DoNotifyAlways(&MuleNotify::DownloadCtrlDoItemSelectionChanged)
481 // source ctrl
482 #define Notify_SourceCtrlUpdateSource(ptr, val) MuleNotify::DoNotify(&MuleNotify::SourceCtrlUpdateSource, ptr, val)
483 #define Notify_SourceCtrlAddSource(p0, p1, val) MuleNotify::DoNotify(&MuleNotify::SourceCtrlAddSource, p0, p1, val)
484 #define Notify_SourceCtrlRemoveSource(ptr0, ptr1) MuleNotify::DoNotify(&MuleNotify::SourceCtrlRemoveSource, ptr0, ptr1)
486 // upload ctrl
487 #define Notify_SharedCtrlAddClient(p0, p1, val) MuleNotify::DoNotify(&MuleNotify::SharedCtrlAddClient, p0, p1, val)
488 #define Notify_SharedCtrlRefreshClient(ptr, val) MuleNotify::DoNotify(&MuleNotify::SharedCtrlRefreshClient, ptr, val)
489 #define Notify_SharedCtrlRemoveClient(p0, p1) MuleNotify::DoNotify(&MuleNotify::SharedCtrlRemoveClient, p0, p1)
491 // server
492 #define Notify_ServerAdd(ptr) MuleNotify::DoNotify(&MuleNotify::ServerAdd, ptr)
493 #define Notify_ServerRemove(ptr) MuleNotify::DoNotify(&MuleNotify::ServerRemove, ptr)
494 #define Notify_ServerRemoveDead() MuleNotify::DoNotify(&MuleNotify::ServerRemoveDead)
495 #define Notify_ServerRemoveAll() MuleNotify::DoNotify(&MuleNotify::ServerRemoveAll)
496 #define Notify_ServerHighlight(ptr, val) MuleNotify::DoNotify(&MuleNotify::ServerHighlight, ptr, val)
497 #define Notify_ServerRefresh(ptr) MuleNotify::DoNotify(&MuleNotify::ServerRefresh, ptr)
498 #define Notify_ServerFreeze() MuleNotify::DoNotify(&MuleNotify::ServerFreeze)
499 #define Notify_ServerThaw() MuleNotify::DoNotify(&MuleNotify::ServerThaw)
500 #define Notify_ServerUpdateED2KInfo() MuleNotify::DoNotify(&MuleNotify::ServerUpdateED2KInfo)
501 #define Notify_ServerUpdateKadKInfo() MuleNotify::DoNotify(&MuleNotify::ServerUpdateKadKInfo)
503 // search
504 #define Notify_SearchCancel() MuleNotify::DoNotify(&MuleNotify::SearchCancel)
505 #define Notify_SearchLocalEnd() MuleNotify::DoNotify(&MuleNotify::SearchLocalEnd)
506 #define Notify_KadSearchEnd(val) MuleNotify::DoNotify(&MuleNotify::KadSearchEnd, val)
507 #define Notify_Search_Update_Sources(ptr) MuleNotify::DoNotify(&MuleNotify::Search_Update_Sources, ptr)
508 #define Notify_Search_Add_Result(s) MuleNotify::DoNotify(&MuleNotify::Search_Add_Result, s)
510 // chat
511 #define Notify_ChatUpdateFriend(ptr) MuleNotify::DoNotify(&MuleNotify::ChatUpdateFriend, ptr)
512 #define Notify_ChatRemoveFriend(ptr) MuleNotify::DoNotify(&MuleNotify::ChatRemoveFriend, ptr)
513 #define Notify_ChatConnResult(val0, val1, s) MuleNotify::DoNotify(&MuleNotify::ChatConnResult, val0, val1, s)
514 #define Notify_ChatProcessMsg(val0, s) MuleNotify::DoNotify(&MuleNotify::ChatProcessMsg, val0, s)
515 #define Notify_ChatSendCaptcha(val0, s) MuleNotify::DoNotify(&MuleNotify::ChatSendCaptcha, val0, s)
517 // misc
518 #define Notify_ShowConnState(val) MuleNotify::DoNotify(&MuleNotify::ShowConnState, val)
519 #define Notify_ShowUserCount(str) MuleNotify::DoNotify(&MuleNotify::ShowUserCount, str)
520 #define Notify_ShowUpdateCatTabTitles() MuleNotify::DoNotify(&MuleNotify::ShowUpdateCatTabTitles)
521 #define Notify_ShowGUI() MuleNotify::DoNotify(&MuleNotify::ShowGUI)
523 // categories
524 #define Notify_CategoryAdded() MuleNotify::DoNotify(&MuleNotify::CategoryAdded)
525 #define Notify_CategoryUpdate(cat) MuleNotify::DoNotify(&MuleNotify::CategoryUpdate, cat)
526 #define Notify_CategoryDelete(cat) MuleNotify::DoNotify(&MuleNotify::CategoryDelete, cat)
528 // server.met/nodes.dat default urls
529 #define Notify_NodesURLChanged(url) MuleNotify::DoNotify(&MuleNotify::NodesURLChanged, url)
530 #define Notify_ServersURLChanged(url) MuleNotify::DoNotify(&MuleNotify::ServersURLChanged, url)
532 // Partfile conversion: Core -> GUI
533 #define Notify_ConvertUpdateProgress(val, text) Notify_ConvertUpdateProgressFull(val, text, wxEmptyString)
534 #define Notify_ConvertUpdateProgressFull(val, text, hdr) MuleNotify::DoNotify(&MuleNotify::ConvertUpdateProgress, val, text, hdr)
535 #define Notify_ConvertUpdateJobInfo(info) MuleNotify::DoNotify(&MuleNotify::ConvertUpdateJobInfo, info)
536 #define Notify_ConvertRemoveJobInfo(id) MuleNotify::DoNotify(&MuleNotify::ConvertRemoveJobInfo, id)
537 #define Notify_ConvertClearInfos() MuleNotify::DoNotify(&MuleNotify::ConvertClearInfos)
538 // Partfile conversion: GUI -> Core
539 #define Notify_ConvertRemoveJob(id) MuleNotify::DoNotify(&MuleNotify::ConvertRemoveJob, id)
540 #define Notify_ConvertRetryJob(id) MuleNotify::DoNotify(&MuleNotify::ConvertRetryJob, id)
541 #define Notify_ConvertReaddAllJobs() MuleNotify::DoNotify(&MuleNotify::ConvertReaddAllJobs)
544 // GUI -> core notification
547 // PartFile
548 #define CoreNotify_PartFile_Swap_A4AF(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Swap_A4AF, ptr)
549 #define CoreNotify_PartFile_Swap_A4AF_Auto(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Swap_A4AF_Auto, ptr)
550 #define CoreNotify_PartFile_Swap_A4AF_Others(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Swap_A4AF_Others, ptr)
551 #define CoreNotify_PartFile_Pause(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Pause, ptr)
552 #define CoreNotify_PartFile_Resume(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Resume, ptr)
553 #define CoreNotify_PartFile_Stop(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Stop, ptr)
554 #define CoreNotify_PartFile_PrioAuto(ptr, val) MuleNotify::DoNotify(&MuleNotify::PartFile_PrioAuto, ptr, val)
555 #define CoreNotify_PartFile_PrioSet(p, v0, v1) MuleNotify::DoNotify(&MuleNotify::PartFile_PrioSet, p, v0, v1)
556 #define CoreNotify_PartFile_Delete(ptr) MuleNotify::DoNotify(&MuleNotify::PartFile_Delete, ptr)
557 #define CoreNotify_PartFile_SetCat(ptr, val) MuleNotify::DoNotify(&MuleNotify::PartFile_SetCat, ptr, val)
559 // KnownFile
560 #define CoreNotify_KnownFile_Up_Prio_Set(ptr, val) MuleNotify::DoNotify(&MuleNotify::KnownFile_Up_Prio_Set, ptr, val)
561 #define CoreNotify_KnownFile_Up_Prio_Auto(ptr) MuleNotify::DoNotify(&MuleNotify::KnownFile_Up_Prio_Auto, ptr)
562 #define CoreNotify_KnownFile_Comment_Set(ptr, v0, v1) MuleNotify::DoNotify(&MuleNotify::KnownFile_Comment_Set, ptr, v0, v1)
564 // Search
565 #define CoreNotify_Search_Add_Download(ptr, val) MuleNotify::DoNotify(&MuleNotify::Search_Add_Download, ptr, val)
566 #define CoreNotify_Search_Update_Progress(val) MuleNotify::DoNotify(&MuleNotify::Search_Update_Progress, val)
568 // download queue
569 #define CoreNotify_Download_Set_Cat_Prio(cat, pri) MuleNotify::DoNotify(&MuleNotify::Download_Set_Cat_Prio, cat, pri)
570 #define CoreNotify_Download_Set_Cat_Status(cat, st) MuleNotify::DoNotify(&MuleNotify::Download_Set_Cat_Status, cat, st)
572 // upload queue
573 #define CoreNotify_Upload_Resort_Queue() MuleNotify::DoNotify(&MuleNotify::Upload_Resort_Queue)
575 // client
576 #define CoreNotify_Client_Delete(client) MuleNotify::DoNotify(&MuleNotify::Client_Delete, client)
579 // core internal notifications
582 // ASIO sockets
583 #define CoreNotify_LibSocketConnect(ptr, val) MuleNotify::DoNotifyAlways(&MuleNotify::LibSocketConnect, ptr, val)
584 #define CoreNotify_LibSocketSend(ptr, val) MuleNotify::DoNotifyAlways(&MuleNotify::LibSocketSend, ptr, val)
585 #define CoreNotify_LibSocketReceive(ptr, val) MuleNotify::DoNotifyAlways(&MuleNotify::LibSocketReceive, ptr, val)
586 #define CoreNotify_LibSocketLost(ptr) MuleNotify::DoNotifyAlways(&MuleNotify::LibSocketLost, ptr)
587 #define CoreNotify_LibSocketDestroy(ptr) MuleNotify::DoNotifyAlways(&MuleNotify::LibSocketDestroy, ptr)
588 #define CoreNotify_ServerTCPAccept(ptr) MuleNotify::DoNotifyAlways(&MuleNotify::ServerTCPAccept, ptr)
589 #define CoreNotify_UDPSocketSend(ptr) MuleNotify::DoNotifyAlways(&MuleNotify::UDPSocketSend, ptr)
590 #define CoreNotify_UDPSocketReceive(ptr) MuleNotify::DoNotifyAlways(&MuleNotify::UDPSocketReceive, ptr)
591 #define CoreNotify_ProxySocketEvent(ptr, val) MuleNotify::DoNotifyAlways(&MuleNotify::ProxySocketEvent, ptr, val)
595 // Notifications that always create an event
598 // IP filter
599 #define NotifyAlways_IPFilter_Reload() MuleNotify::DoNotifyAlways(&MuleNotify::IPFilter_Reload)
600 #define NotifyAlways_IPFilter_Update(url) MuleNotify::DoNotifyAlways(&MuleNotify::IPFilter_Update, url)
602 #endif // __GUIEVENTS_H__
604 // File_checked_for_headers