security/manager/ssl/src/nsProtectedAuthThread.h

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     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_
     8 #include <nsCOMPtr.h>
     9 #include "keyhi.h"
    10 #include "nspr.h"
    12 #include "mozilla/Mutex.h"
    13 #include "nsIProtectedAuthThread.h"
    15 class nsIRunnable;
    17 class nsProtectedAuthThread : public nsIProtectedAuthThread
    18 {
    19 private:
    20     mozilla::Mutex mMutex;
    22     nsCOMPtr<nsIRunnable> mNotifyObserver;
    24     bool        mIAmRunning;
    25     bool        mLoginReady;
    27     PRThread    *mThreadHandle;
    29     // Slot to do authentication on
    30     PK11SlotInfo*   mSlot;
    32     // Result of the authentication
    33     SECStatus       mLoginResult;
    35 public:
    37     nsProtectedAuthThread();
    38     virtual ~nsProtectedAuthThread();
    40     NS_DECL_THREADSAFE_ISUPPORTS
    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();
    49     void Join(void);
    51     void Run(void);
    52 };
    54 #endif // NSPROTECTEDAUTHTHREAD_H_

mercurial