Fixed bug #830: pkg-config support. YAZ installs yaz.pc for Debian
[yaz-moved-to-github.git] / src / service.h
1 /*
2  * NT Service interface Utility.
3  *  Based on code written by
4  *     Chas Woodfield, Fretwell Downing Datasystems.
5  * $Id: service.h,v 1.3 2005-06-25 15:46:05 adam Exp $
6  */
7 /**
8  * \file service.h
9  * \brief Header for NT service handling.
10  */
11
12 #ifndef SERVICE_INCLUDED
13 #define SERVICE_INCLUDED
14
15 #ifdef WIN32
16
17 #include <windows.h>
18
19 typedef struct _Service
20 {
21     LPTSTR pAppName;
22     LPTSTR pServiceName;
23     LPTSTR pServiceDisplayName;
24     LPTSTR pDependancies;
25     TCHAR szErr[256];
26     SERVICE_STATUS_HANDLE hService;
27     SERVICE_STATUS ServiceStatus;
28     SERVICE_TABLE_ENTRY ServiceTable[2];
29     int argc;
30     char **argv;
31 } AppService;
32
33 /* Called by the app to initialize the service */
34 BOOL SetupService(int argc, char *argv[], void *pHandle, LPTSTR pAppName, LPTSTR pServiceName, LPTSTR pServiceDisplayName, LPTSTR pDependancies);
35
36 #endif /* WIN32 */
37
38 /* Functions that must be in the main application */
39 /* Initializes the app */
40 int StartAppService(void *pHandle, int argc, char **argv);
41
42 /* Now we wait for any connections */
43 void RunAppService(void *pHandle);
44
45 /* Time to tidyup and stop the service */
46 void StopAppService(void *pHandle);
47
48 #endif
49 /*
50  * Local variables:
51  * c-basic-offset: 4
52  * indent-tabs-mode: nil
53  * End:
54  * vim: shiftwidth=4 tabstop=8 expandtab
55  */
56