Updated all files to GPL version 3.
[xboard.git] / winboard / wplugin.h
1 /*\r
2  * wplugin.h\r
3  *\r
4  * Copyright 2009 Free Software Foundation, Inc.\r
5  * ------------------------------------------------------------------------\r
6  *\r
7  * GNU XBoard is free software: you can redistribute it and/or modify\r
8  * it under the terms of the GNU General Public License as published by\r
9  * the Free Software Foundation, either version 3 of the License, or (at\r
10  * your option) any later version.\r
11  *\r
12  * GNU XBoard is distributed in the hope that it will be useful, but\r
13  * WITHOUT ANY WARRANTY; without even the implied warranty of\r
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r
15  * General Public License for more details.\r
16  *\r
17  * You should have received a copy of the GNU General Public License\r
18  * along with this program. If not, see http://www.gnu.org/licenses/.  *\r
19  *\r
20  *------------------------------------------------------------------------\r
21  ** See the file ChangeLog for a revision history.  */\r
22 \r
23 #ifndef WPLUGIN_H_\r
24 #define WPLUGIN_H_\r
25 \r
26 #include <windows.h>\r
27 \r
28 #define MaxWbPlugins 16\r
29 \r
30 typedef struct WbPlugin_tag\r
31 {\r
32     char * name_;\r
33     char * exe_name_;\r
34     HANDLE hPipe_;\r
35     HANDLE hProcess_;\r
36 } WbPlugin;\r
37 \r
38 typedef struct WbPluginList_tag\r
39 {\r
40     int item_count_;\r
41     WbPlugin * item_[MaxWbPlugins];\r
42 } WbPluginList;\r
43 \r
44 WbPlugin * wbpCreate( const char * name );\r
45 \r
46 void wbpDelete( WbPlugin * plugin );\r
47 \r
48 int wbpSendMessage( WbPlugin * plugin, const char * msg, size_t msg_len );\r
49 \r
50 int wbpListInit( WbPluginList * list );\r
51 \r
52 int wbpListAdd( WbPluginList * list, WbPlugin * plugin );\r
53 \r
54 WbPlugin * wbpListGet( WbPluginList * list, int index );\r
55 \r
56 int wbpListGetCount( WbPluginList * list );\r
57 \r
58 int wbpListDeleteAll( WbPluginList * list );\r
59 \r
60 int wbpListBroadcastMessage( WbPluginList * list, const char * msg, size_t msg_len );\r
61 \r
62 #endif // WPLUGIN_H_\r