00001
00009
00010
00011 #ifndef __MRT_PLUGIN_H_INCLUDE__
00012 #define __MRT_PLUGIN_H_INCLUDE__
00013
00014
00015 #include <Windows.h>
00016
00017
00018 enum{
00019 COMMAND_UNKNOWN=0,
00020 COMMAND_REBOOT,
00021 COMMAND_LINKUP,
00022 COMMAND_LINKDOWN,
00023 COMMAND_GETLOG,
00024 COMMAND_GETLOG_SYSTEM,
00025 COMMAND_GETIP,
00026 COMMAND_GETIPS,
00027 COMMAND_GETALLINFO,
00028 COMMAND_ENABLE_ECO,
00029 COMMAND_START_ECO,
00030 COMMAND_DISABLE_ECO,
00031 COMMAND_ECO,
00032
00033 COMMAND_ARRAY_END,
00034 };
00035
00036
00037 enum{
00038 PLUGIN_SUCCESS=0,
00039 PLUGIN_ERROR,
00040 PLUGIN_SIGNAL,
00041 PLUGIN_UNKNOWN,
00042 };
00043
00044 typedef void (__cdecl *typedef_sleep)( DWORD millis );
00045 typedef int (__cdecl *typedef_out)( const char* str );
00046 typedef int (__cdecl *typedef_outf)( const char* format, ... );
00047 typedef int (__cdecl *typedef_set_error)( const char* format, ... );
00048 typedef char* (__cdecl *typedef_commond)();
00049 typedef int (__cdecl *typedef_access_init)();
00050 typedef char* (__cdecl *typedef_access_get)( const char* path );
00051 typedef char* (__cdecl *typedef_access_post)( const char* path, const char* post_data );
00052 typedef char* (__cdecl *typedef_filter_htmltag)( const char* str, const char* tag );
00053 typedef char* (__cdecl *typedef_filter_htmlclass)( const char* str, const char* tag_class );
00054 typedef char* (__cdecl *typedef_pickup_htmlhidden)( const char* str );
00055 typedef char* (__cdecl *typedef_pickup_htmlsubmit)( const char* str );
00056 typedef char* (__cdecl *typedef_pickup_htmlinputselect)( const char* str, BOOL bEnableInput );
00057 typedef char* (__cdecl *typedef_string_concat)( const char* a, const char* b );
00058 typedef char* (__cdecl *typedef_string_trim)( const char* src );
00059 typedef char* (__cdecl *typedef_string_setvalue)( const char* src, const char* key, const char* value );
00060 typedef char* (__cdecl *typedef_string_getvalue)( const char* src, const char* key );
00061 typedef char* (__cdecl *typedef_string_deletekey)( const char* src, const char* key );
00062 typedef char* (__cdecl *typedef_string_substr)( const char* src, int s, int e );
00063 typedef char* (__cdecl *typedef_string_euc2sjis)( const char* src );
00064 typedef char* (__cdecl *typedef_string_utf82sjis)( const char* src );
00065
00066
00067 typedef struct{
00071 typedef_sleep sleep;
00075 typedef_out out;
00079 typedef_outf outf;
00083 typedef_set_error set_error;
00087 typedef_commond commond;
00091 typedef_access_init access_init;
00095 typedef_access_get access_get;
00099 typedef_access_post access_post;
00103 typedef_filter_htmltag filter_htmltag;
00107 typedef_filter_htmlclass filter_htmlclass;
00111 typedef_filter_htmlclass filter_htmlid;
00115 typedef_pickup_htmlhidden pickup_htmlhidden;
00119 typedef_pickup_htmlsubmit pickup_htmlsubmit;
00123 typedef_pickup_htmlinputselect pickup_htmlinputselect;
00127 typedef_string_concat string_concat;
00131 typedef_string_trim string_trim;
00135 typedef_string_setvalue string_setvalue;
00139 typedef_string_getvalue string_getvalue;
00143 typedef_string_deletekey string_deletekey;
00147 typedef_string_substr string_substr;
00151 typedef_string_euc2sjis string_euc2sjis;
00155 typedef_string_utf82sjis string_utf82sjis;
00156 }PluginMethod;
00157
00158
00162 class __declspec(dllexport) SigintException{
00163 public:
00164 };
00165
00166
00167
00168
00169
00170 extern "C"{
00171
00172 __declspec(dllexport) bool __cdecl mrtp_startup( PluginMethod* method );
00173 __declspec(dllexport) int __cdecl mrtp_main( PluginMethod* method, int command, const char* command_arg );
00174 __declspec(dllexport) void __cdecl mrtp_cleanup( PluginMethod* method );
00175 __declspec(dllexport) char* __cdecl mrtp_plugin_name();
00176 __declspec(dllexport) char* __cdecl mrtp_plugin_author();
00177 __declspec(dllexport) char* __cdecl mrtp_plugin_version();
00178 __declspec(dllexport) char* __cdecl mrtp_plugin_routername();
00179 __declspec(dllexport) char* __cdecl mrtp_plugin_homepage();
00180 __declspec(dllexport) bool __cdecl mrtp_plugin_help( PluginMethod* method );
00181
00182 }
00183
00184 #endif // __MRT_PLUGIN_H_INCLUDE__