00001 #include "apluginthread.h" 00002 00003 00004 00005 APluginThread::APluginThread(PluginServer *plugin_server) 00006 : Thread() 00007 { 00008 synchronous = 1; 00009 this->plugin_server = new PluginServer(*plugin_server); 00010 } 00011 00012 APluginThread::~APluginThread() 00013 { 00014 delete plugin_server; 00015 } 00016 00017 APluginThread::attach() 00018 { 00019 // open the plugin 00020 plugin_server->open_plugin(); 00021 00022 // thread the GUI 00023 plugin_server->start_gui(); 00024 } 00025 00026 APluginThread::detach() 00027 { 00028 printf("APluginThread::detach\n"); 00029 if(plugin_server) 00030 { 00031 printf("plugin_server->stop_gui\n"); 00032 plugin_server->stop_gui(); // sends a completed command to the thread 00033 00034 printf("plugin_server->close_plugin\n"); 00035 plugin_server->close_plugin(); // tell client thread to finish 00036 printf("done plugin_server->close_plugin\n"); 00037 } 00038 } 00039 00040 void APluginThread::run() 00041 { 00042 }
1.4.4