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/. */
5 #ifndef NSPROTECTEDAUTHTHREAD_H_
6 #define NSPROTECTEDAUTHTHREAD_H_
12 #include "mozilla/Mutex.h"
13 #include "nsIProtectedAuthThread.h"
17 class nsProtectedAuthThread
: public nsIProtectedAuthThread
20 mozilla::Mutex mMutex
;
22 nsCOMPtr
<nsIRunnable
> mNotifyObserver
;
27 PRThread
*mThreadHandle
;
29 // Slot to do authentication on
32 // Result of the authentication
33 SECStatus mLoginResult
;
37 nsProtectedAuthThread();
38 virtual ~nsProtectedAuthThread();
41 NS_DECL_NSIPROTECTEDAUTHTHREAD
43 // Sets parameters for the thread
44 void SetParams(PK11SlotInfo
*slot
);
46 // Gets result of the protected authentication operation
47 SECStatus
GetResult();
54 #endif // NSPROTECTEDAUTHTHREAD_H_