dtsession: fix screen saver/locking on linux
[oweals/cde.git] / cde / programs / dtprintinfo / objects / PrintObj / ParseJobs.h
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these libraries and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: ParseJobs.h /main/3 1995/11/06 09:46:45 rswiston $ */
24 /*                                                                      *
25  * (c) Copyright 1993, 1994 Hewlett-Packard Company                     *
26  * (c) Copyright 1993, 1994 International Business Machines Corp.       *
27  * (c) Copyright 1993, 1994 Sun Microsystems, Inc.                      *
28  * (c) Copyright 1993, 1994 Novell, Inc.                                *
29  */
30
31 #ifndef PARSEJOBS_H
32 #define PARSEJOBS_H
33
34 typedef enum
35 {
36    UNKNOWN_OUTPUT,
37    AIX_V2_OUTPUT,
38    AIX_V3_OUTPUT,
39    BSD_OUTPUT
40 } JobOutputType;   
41
42 extern JobOutputType DetermineOutput(char *output);
43
44 // returns socket to print server, or -1 if error
45 // timeout is in seconds, a default of 5 is used if timeout <= 0.
46 extern int ConnectToPrintServer(const char *server, int timeout);
47
48 // return 0 if error, otherwise return 1 if successful
49 extern int SendPrintJobStatusReguest(int sockfd, const char *printer);
50
51 extern void LocalPrintJobs(
52    char *printer,
53    char **return_job_list,
54    int *return_n_jobs);
55
56 extern int RemotePrintJobs(
57    char *server,
58    char *printer,
59    char **return_job_list,
60    int *return_n_jobs);
61
62 extern int ParseRemotePrintJobs(
63    char *printer,
64    char *jobs,
65    char **return_job_list,
66    int *return_n_jobs);
67
68 extern int ParseBSDPrintJobs(
69    char *printer,
70    char *jobs,
71    char **return_job_list,
72    int *return_n_jobs);
73
74 extern int ParseAIXv3PrintJobs(
75    char *printer,
76    char *jobs,
77    char **return_job_list,
78    int *return_n_jobs);
79
80 extern int ParseAIXv2PrintJobs(
81    char *printer,
82    char *jobs,
83    char **return_job_list,
84    int *return_n_jobs);
85
86 #endif // PARSEJOBS_H