security/nss/lib/softoken/legacydb/cdbhdl.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

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     4 /*
     5  * cdbhdl.h - certificate database handle
     6  *   private to the certdb module
     7  */
     8 #ifndef _CDBHDL_H_
     9 #define _CDBHDL_H_
    11 #include "nspr.h"
    12 #include "mcom_db.h"
    13 #include "pcertt.h"
    14 #include "prtypes.h"
    16 /*
    17  * Handle structure for open certificate databases
    18  */
    19 struct NSSLOWCERTCertDBHandleStr {
    20     DB *permCertDB;
    21     PZMonitor *dbMon;
    22     PRBool dbVerify;
    23     PRInt32  ref; /* reference count */
    24 };
    26 #ifdef DBM_USING_NSPR
    27 #define NO_RDONLY	PR_RDONLY
    28 #define NO_RDWR		PR_RDWR
    29 #define NO_CREATE	(PR_RDWR | PR_CREATE_FILE | PR_TRUNCATE)
    30 #else
    31 #define NO_RDONLY	O_RDONLY
    32 #define NO_RDWR		O_RDWR
    33 #define NO_CREATE	(O_RDWR | O_CREAT | O_TRUNC)
    34 #endif
    36 typedef DB * (*rdbfunc)(const char *appName, const char *prefix, 
    37 				const char *type, int flags);
    38 typedef int (*rdbstatusfunc)(void);
    40 #define RDB_FAIL 1
    41 #define RDB_RETRY 2
    43 DB * rdbopen(const char *appName, const char *prefix, 
    44 				const char *type, int flags, int *status);
    46 DB *dbsopen (const char *dbname , int flags, int mode, DBTYPE type, 
    47 						const void * appData);
    48 SECStatus db_Copy(DB *dest,DB *src);
    49 int db_InitComplete(DB *db);
    51 #endif

mercurial