added ticket parser: plugins/ticket/ticketparser.h plugins/ticket/ticketparser.cpp

git-svn-id: svn://ttmath.org/publicrep/winix/trunk@663 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2010-10-11 20:42:49 +00:00
parent 07511a2eb0
commit 33057acd62
23 changed files with 777 additions and 86 deletions

View File

@@ -177,6 +177,7 @@ Error Mounts::ReadMounts(const std::string & mounts)
}
CalcCurMount();
plugin.Call(WINIX_FSTAB_CHANGED);
return err;
}

View File

@@ -8,6 +8,7 @@
*/
#include <dlfcn.h>
#include <string.h>
#include "plugin.h"
#include "pluginmsg.h"
@@ -195,6 +196,29 @@ int old_current_plugin;
bool Plugin::HasPlugin(const char * name)
{
if( *name == 0 )
return false;
for(size_t i=0 ; i<plugins.size() ; ++i)
{
if( plugins[i].plugin_name && strcmp(plugins[i].plugin_name, name) == 0 )
return true;
}
return false;
}
bool Plugin::HasPlugin(const std::string & name)
{
return HasPlugin(name.c_str());
}
void Plugin::Call(int message, Slots::iterator & slot)
{
if( !SetPointers(info) )

View File

@@ -139,6 +139,9 @@ public:
void LoadPlugins(const std::string & plugins_dir, const std::vector<std::string> & plugins);
void UnloadPlugins();
bool HasPlugin(const char * name);
bool HasPlugin(const std::string & name);
void Call(int message);
void Call(int message, void * p1_);
void Call(int message, void * p1_, void * p2_);

View File

@@ -59,5 +59,10 @@
// if you do not select it then it will be choosen by winix
#define WINIX_SELECT_DEFAULT_FUNCTION 3011
// /etc/fstab has been changed
// now we have new mount points
#define WINIX_FSTAB_CHANGED 3012
#endif