First commit, mainly testing.
[reactos.git] / rosapps / packmgr / lib / package.h
1 ////////////////////////////////////////////////
2 //
3 // package.hpp
4 // Package C++ Header
5 ////////////////////////////////////////////////
6
7 #include <windows.h>
8 #include "error.h"
9
10
11 /* Callbacks */
12
13 typedef int (*PML_AddItem) (int id, const char* name, int parent, int icon);
14 typedef int (*PML_SetStatus) (int status1, int status2, WCHAR* text);
15 typedef int (*PML_SetButton) (DWORD dwID, BOOL state);
16 typedef int (*PML_SetIcon) (int id, int icon);
17 typedef int (*PML_SetText) (const char* text);
18 typedef int (*PML_Ask) (const WCHAR* text);
19
20
21 /* Structs */
22
23 typedef void* pTree;
24
25 #define MAXNODES 10000
26
27
28 /* Prototypes */
29
30 void PML_Abort (void);
31 WCHAR* PML_TransError (int code);
32
33 int PML_LoadTree (pTree*, char* url, PML_AddItem);
34 int PML_FindItem (pTree tree, const char* what);
35 int PML_LoadPackage (pTree, int id, PML_SetButton);
36 char* PML_GetDescription (pTree tree, int id);
37 int PML_SetAction (pTree, int package, int action, PML_SetIcon, PML_Ask);
38 int PML_DoIt (pTree, PML_SetStatus, PML_Ask);
39
40 void PML_CloseTree (pTree);
41
42
43 /* Version */
44
45 #define PACKMGR_VERSION_MAJOR 0
46 #define PACKMGR_VERSION_MINOR 3
47 #define PACKMGR_VERSION_PATCH_LEVEL 1