1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:expandtab:shiftwidth=2:tabstop=2:
4 /* This Source Code Form is subject to the terms of the Mozilla Public
5 * License, v. 2.0. If a copy of the MPL was not distributed with this
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 #ifndef TOOLKIT_COMPONENTS_REMOTE_NSREMOTESERVER_H_
9 #define TOOLKIT_COMPONENTS_REMOTE_NSREMOTESERVER_H_
11 #include "nsRemoteServer.h"
12 #include "nsIObserver.h"
13 #include "mozilla/UniquePtr.h"
15 #include "nsProfileLock.h"
23 class nsRemoteService final
: public nsIObserver
{
25 // We will be a static singleton, so don't use the ordinary methods.
29 explicit nsRemoteService(const char* aProgram
);
30 void SetProfile(nsACString
& aProfile
);
35 RemoteResult
StartClient(const char* aStartupToken
);
37 void ShutdownServer();
42 mozilla::UniquePtr
<nsRemoteServer
> mRemoteServer
;
43 nsProfileLock mRemoteLock
;
44 nsCOMPtr
<nsIFile
> mRemoteLockDir
;
49 #endif // TOOLKIT_COMPONENTS_REMOTE_NSREMOTESERVER_H_