Bug 1928997: Update tabs icon in Unified Search popup r=desktop-theme-reviewers,daleh...
[gecko.git] / security / manager / ssl / nsIPK11Token.idl
blobae8fc2e994f1dd3e7bef2377891200294e43f322
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 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/. */
7 #include "nsISupports.idl"
9 [scriptable, uuid(51191434-1dd2-11b2-a17c-e49c4e99a4e3)]
10 interface nsIPK11Token : nsISupports
13 * The name of the token
15 [must_use]
16 readonly attribute AUTF8String tokenName;
17 [must_use]
18 readonly attribute boolean isInternalKeyToken;
19 /**
20 * Manufacturer ID of the token.
22 [must_use]
23 readonly attribute AUTF8String tokenManID;
24 /**
25 * Hardware version of the token.
27 [must_use]
28 readonly attribute AUTF8String tokenHWVersion;
29 /**
30 * Firmware version of the token.
32 [must_use]
33 readonly attribute AUTF8String tokenFWVersion;
34 [must_use]
35 readonly attribute AUTF8String tokenSerialNumber;
38 * Login information
40 [must_use]
41 boolean isLoggedIn();
42 [must_use]
43 void login(in boolean force);
44 [must_use]
45 void logoutSimple();
46 [must_use]
47 void logoutAndDropAuthenticatedResources();
48 [must_use]
49 boolean needsLogin();
50 [must_use]
51 readonly attribute boolean needsUserInit;
54 * Reset password
56 [must_use]
57 void reset();
59 /**
60 * Checks whether the given password is correct. Logs the token out if an
61 * incorrect password is given.
63 * @param password The password to check.
64 * @return true if the password was correct, false otherwise.
66 [must_use]
67 boolean checkPassword(in AUTF8String password);
68 [must_use]
69 void initPassword(in AUTF8String initialPassword);
70 [must_use]
71 void changePassword(in AUTF8String oldPassword, in AUTF8String newPassword);
74 * True if a password has been configured for this token, and false otherwise.
75 * (Whether or not the user is currently logged in makes no difference.)
76 * In particular, this can be used to determine if a user has set a master
77 * password (if this is the internal key token).
79 [must_use]
80 readonly attribute boolean hasPassword;