security/nss/cmd/modutil/install.h

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #ifndef PK11INSTALL_H
michael@0 6 #define PK11INSTALL_H
michael@0 7
michael@0 8 #include <prio.h>
michael@0 9
michael@0 10 #ifdef __cplusplus
michael@0 11 extern "C" {
michael@0 12 #endif
michael@0 13
michael@0 14 typedef void (*Pk11Install_ErrorHandler)(char *);
michael@0 15
michael@0 16 typedef enum {
michael@0 17 PK11_INSTALL_NO_ERROR=0,
michael@0 18 PK11_INSTALL_DIR_DOESNT_EXIST,
michael@0 19 PK11_INSTALL_FILE_DOESNT_EXIST,
michael@0 20 PK11_INSTALL_FILE_NOT_READABLE,
michael@0 21 PK11_INSTALL_ERROR_STRING,
michael@0 22 PK11_INSTALL_JAR_ERROR,
michael@0 23 PK11_INSTALL_NO_INSTALLER_SCRIPT,
michael@0 24 PK11_INSTALL_DELETE_TEMP_FILE,
michael@0 25 PK11_INSTALL_OPEN_SCRIPT_FILE,
michael@0 26 PK11_INSTALL_SCRIPT_PARSE,
michael@0 27 PK11_INSTALL_SEMANTIC,
michael@0 28 PK11_INSTALL_SYSINFO,
michael@0 29 PK11_INSTALL_NO_PLATFORM,
michael@0 30 PK11_INSTALL_BOGUS_REL_DIR,
michael@0 31 PK11_INSTALL_NO_MOD_FILE,
michael@0 32 PK11_INSTALL_ADD_MODULE,
michael@0 33 PK11_INSTALL_JAR_EXTRACT,
michael@0 34 PK11_INSTALL_DIR_NOT_WRITEABLE,
michael@0 35 PK11_INSTALL_CREATE_DIR,
michael@0 36 PK11_INSTALL_REMOVE_DIR,
michael@0 37 PK11_INSTALL_EXEC_FILE,
michael@0 38 PK11_INSTALL_WAIT_PROCESS,
michael@0 39 PK11_INSTALL_PROC_ERROR,
michael@0 40 PK11_INSTALL_USER_ABORT,
michael@0 41 PK11_INSTALL_UNSPECIFIED
michael@0 42 } Pk11Install_Error;
michael@0 43 #define PK11_INSTALL_SUCCESS PK11_INSTALL_NO_ERROR
michael@0 44
michael@0 45 /**************************************************************************
michael@0 46 *
michael@0 47 * P k 1 1 I n s t a l l _ I n i t
michael@0 48 *
michael@0 49 * Does initialization that otherwise would be done on the fly. Only
michael@0 50 * needs to be called by multithreaded apps, before they make any calls
michael@0 51 * to this library.
michael@0 52 */
michael@0 53 void
michael@0 54 Pk11Install_Init();
michael@0 55
michael@0 56 /**************************************************************************
michael@0 57 *
michael@0 58 * P k 1 1 I n s t a l l _ S e t E r r o r H a n d l e r
michael@0 59 *
michael@0 60 * Sets the error handler to be used by the library. Returns the current
michael@0 61 * error handler function.
michael@0 62 */
michael@0 63 Pk11Install_ErrorHandler
michael@0 64 Pk11Install_SetErrorHandler(Pk11Install_ErrorHandler handler);
michael@0 65
michael@0 66
michael@0 67 /**************************************************************************
michael@0 68 *
michael@0 69 * P k 1 1 I n s t a l l _ R e l e a s e
michael@0 70 *
michael@0 71 * Releases static data structures used by the library. Don't use the
michael@0 72 * library after calling this, unless you call Pk11Install_Init()
michael@0 73 * first. This function doesn't have to be called at all unless you're
michael@0 74 * really anal about freeing memory before your program exits.
michael@0 75 */
michael@0 76 void
michael@0 77 Pk11Install_Release();
michael@0 78
michael@0 79 /*************************************************************************
michael@0 80 *
michael@0 81 * P k 1 1 I n s t a l l _ D o I n s t a l l
michael@0 82 *
michael@0 83 * jarFile is the path of a JAR in the PKCS #11 module JAR format.
michael@0 84 * installDir is the directory relative to which files will be
michael@0 85 * installed.
michael@0 86 * feedback is a file descriptor to which to write informative (not error)
michael@0 87 * status messages: what files are being installed, what modules are being
michael@0 88 * installed. If feedback==NULL, no messages will be displayed.
michael@0 89 * If force != 0, interactive prompts will be suppressed.
michael@0 90 * If noverify == PR_TRUE, signatures won't be checked on the JAR file.
michael@0 91 */
michael@0 92 Pk11Install_Error
michael@0 93 Pk11Install_DoInstall(char *jarFile, const char *installDir,
michael@0 94 const char *tempDir, PRFileDesc *feedback, short force,
michael@0 95 PRBool noverify);
michael@0 96
michael@0 97 #ifdef __cplusplus
michael@0 98 }
michael@0 99 #endif
michael@0 100
michael@0 101 #endif /*PK11INSTALL_H*/

mercurial