1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * 3 * This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7#include "nsISupports.idl" 8 9interface nsIPK11Token; 10 11[scriptable, uuid(c2d4f296-ee60-11d4-998b-00b0d02354a0)] 12interface nsIPKCS11Slot : nsISupports { 13 [must_use] 14 readonly attribute AUTF8String name; 15 [must_use] 16 readonly attribute AUTF8String desc; 17 /** 18 * Manufacturer ID of the slot. 19 */ 20 [must_use] 21 readonly attribute AUTF8String manID; 22 /** 23 * Hardware version of the slot. 24 */ 25 [must_use] 26 readonly attribute AUTF8String HWVersion; 27 /** 28 * Firmware version of the slot. 29 */ 30 [must_use] 31 readonly attribute AUTF8String FWVersion; 32 33 const unsigned long SLOT_DISABLED = 0; 34 const unsigned long SLOT_NOT_PRESENT = 1; 35 const unsigned long SLOT_UNINITIALIZED = 2; 36 const unsigned long SLOT_NOT_LOGGED_IN = 3; 37 const unsigned long SLOT_LOGGED_IN = 4; 38 const unsigned long SLOT_READY = 5; 39 [must_use] 40 readonly attribute unsigned long status; 41 42 /* This is really a workaround for now. All of the "slot" functions 43 * (isTokenPresent(), etc.) are in nsIPK11Token. For now, return the 44 * token and handle those things there. 45 */ 46 [must_use] 47 nsIPK11Token getToken(); 48 49 /* more fun with workarounds - we're referring to everything by token name */ 50 [must_use] 51 readonly attribute AUTF8String tokenName; 52}; 53