summaryrefslogtreecommitdiff
path: root/cups/file-private.h
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-04-22 23:02:56 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2011-04-22 23:02:56 +0000
commit22c9029b44a790ba1ee894027431dcea1ec2aeab (patch)
tree20e787f4b9f7c9c574cf3450bf8326c83192fe39 /cups/file-private.h
parent07ed0e9a4385437b52e7195b681e600c2f1c5623 (diff)
downloadcups-22c9029b44a790ba1ee894027431dcea1ec2aeab.tar.gz
Merge changes from CUPS 1.5svn-r9717.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@3171 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/file-private.h')
-rw-r--r--cups/file-private.h43
1 files changed, 42 insertions, 1 deletions
diff --git a/cups/file-private.h b/cups/file-private.h
index 0cfd9a549..42e4bfab7 100644
--- a/cups/file-private.h
+++ b/cups/file-private.h
@@ -8,7 +8,7 @@
* our own file functions allows us to provide transparent support of
* gzip'd print files, PPD files, etc.
*
- * Copyright 2007-2010 by Apple Inc.
+ * Copyright 2007-2011 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
@@ -59,10 +59,34 @@
# endif /* !O_BINARY */
+# ifdef __cplusplus
+extern "C" {
+# endif /* __cplusplus */
+
+
/*
* Types and structures...
*/
+typedef enum /**** _cupsFileCheck return values ****/
+{
+ _CUPS_FILE_CHECK_OK = 0, /* Everything OK */
+ _CUPS_FILE_CHECK_MISSING = 1, /* File is missing */
+ _CUPS_FILE_CHECK_PERMISSIONS = 2, /* File (or parent dir) has bad perms */
+ _CUPS_FILE_CHECK_WRONG_TYPE = 3 /* File has wrong type */
+} _cups_fc_result_t;
+
+typedef enum /**** _cupsFileCheck file type values ****/
+{
+ _CUPS_FILE_CHECK_FILE = 0, /* Check the file and parent directory */
+ _CUPS_FILE_CHECK_PROGRAM = 1, /* Check the program and parent directory */
+ _CUPS_FILE_CHECK_FILE_ONLY = 2, /* Check the file only */
+ _CUPS_FILE_CHECK_DIRECTORY = 3 /* Check the directory */
+} _cups_fc_filetype_t;
+
+typedef void (*_cups_fc_func_t)(void *context, _cups_fc_result_t result,
+ const char *message);
+
struct _cups_file_s /**** CUPS file structure... ****/
{
@@ -88,6 +112,23 @@ struct _cups_file_s /**** CUPS file structure... ****/
};
+/*
+ * Prototypes...
+ */
+
+extern _cups_fc_result_t _cupsFileCheck(const char *filename,
+ _cups_fc_filetype_t filetype,
+ int dorootchecks,
+ _cups_fc_func_t cb,
+ void *context);
+extern void _cupsFileCheckFilter(void *context,
+ _cups_fc_result_t result,
+ const char *message);
+
+# ifdef __cplusplus
+}
+# endif /* __cplusplus */
+
#endif /* !_CUPS_FILE_PRIVATE_H_ */
/*