|
foobar2000 SDK
2015-01-14
|
#include <completion_notify.h>
Inheritance diagram for completion_notify:Public Member Functions | |
| FB2K_MAKE_SERVICE_INTERFACE (completion_notify, service_base) | |
| virtual void | on_completion (unsigned p_code)=0 |
| void | on_completion_async (unsigned p_code) |
Public Member Functions inherited from service_base | |
| template<typename outPtr_t > | |
| bool | cast (outPtr_t &outPtr) |
| virtual int | service_add_ref ()=0 throw () |
| virtual bool | service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid) |
| template<class T > | |
| bool | service_query_t (service_ptr_t< T > &p_out) |
| virtual int | service_release ()=0 throw () |
Static Public Member Functions | |
| static void | g_signal_completion_async (service_ptr_t< completion_notify > p_notify, unsigned p_code) |
Additional Inherited Members | |
Public Types inherited from service_base | |
| typedef service_base | t_interface |
Protected Member Functions inherited from service_base | |
| service_base () | |
| ~service_base () | |
Generic service for receiving notifications about async operation completion. Used by various other services.
Definition at line 2 of file completion_notify.h.
| completion_notify::FB2K_MAKE_SERVICE_INTERFACE | ( | completion_notify | , |
| service_base | |||
| ) |
|
static |
Helper. Checks for null ptr and calls on_completion_async when the ptr is not null.
Definition at line 17 of file completion_notify.cpp.
|
pure virtual |
Called when an async operation has been completed. Note that on_completion is always called from main thread. You can use on_completion_async() helper if you need to signal completion while your context is in another thread.
IMPLEMENTATION WARNING: If process being completed creates a window taking caller's window as parent, you must not destroy the parent window inside on_completion(). If you need to do so, use PostMessage() or main_thread_callback to delay the deletion.
| p_code | Context-specific status code. Possible values depend on the operation being performed. |
Implemented in completion_notify_impl< t_receiver >, and completion_notify_dummy.
| void completion_notify::on_completion_async | ( | unsigned | p_code | ) |
Helper. Queues a notification, using main_thread_callback.
Definition at line 23 of file completion_notify.cpp.
1.8.9.1