Bug 1835241 - Part 6: Use the same parameter names at definition and declaration...
[gecko.git] / toolkit / profile / ProfileUnlockerWin.h
blob6429301394c87a7a377694b5eaede6abb2272426
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
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 #ifndef ProfileUnlockerWin_h
8 #define ProfileUnlockerWin_h
10 #include <windows.h>
11 #include <restartmanager.h>
13 #include "nsIProfileUnlocker.h"
14 #include "nsString.h"
15 #include "nsWindowsHelpers.h"
17 namespace mozilla {
19 class ProfileUnlockerWin final : public nsIProfileUnlocker {
20 public:
21 NS_DECL_ISUPPORTS
22 NS_DECL_NSIPROFILEUNLOCKER
24 explicit ProfileUnlockerWin(const nsAString& aFileName);
26 nsresult Init();
28 DWORD StartSession(DWORD& aHandle);
29 void EndSession(DWORD aHandle);
31 private:
32 ~ProfileUnlockerWin();
33 nsresult TryToTerminate(RM_UNIQUE_PROCESS& aProcess);
35 private:
36 typedef DWORD(WINAPI* RMSTARTSESSION)(DWORD*, DWORD, WCHAR[]);
37 typedef DWORD(WINAPI* RMREGISTERRESOURCES)(DWORD, UINT, LPCWSTR[], UINT,
38 RM_UNIQUE_PROCESS[], UINT,
39 LPCWSTR[]);
40 typedef DWORD(WINAPI* RMGETLIST)(DWORD, UINT*, UINT*, RM_PROCESS_INFO[],
41 LPDWORD);
42 typedef DWORD(WINAPI* RMENDSESSION)(DWORD);
44 private:
45 nsModuleHandle mRestartMgrModule;
46 RMSTARTSESSION mRmStartSession;
47 RMREGISTERRESOURCES mRmRegisterResources;
48 RMGETLIST mRmGetList;
49 RMENDSESSION mRmEndSession;
51 nsString mFileName;
54 } // namespace mozilla
56 #endif // ProfileUnlockerWin_h