Bug 1735252 [wpt PR 31197] - Regenerate WPT certificates, a=testonly
[gecko.git] / toolkit / components / remote / nsDBusRemoteClient.h
blob92e7e02b9fee0891882d45594913b3f07cb56248
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef DBusRemoteClient_h__
7 #define DBusRemoteClient_h__
9 #include "nsRemoteClient.h"
10 #include "mozilla/StaticPtr.h"
11 #include "mozilla/DBusHelpers.h"
12 #include "nsString.h"
14 class nsDBusRemoteClient : public nsRemoteClient {
15 public:
16 nsDBusRemoteClient();
17 ~nsDBusRemoteClient();
19 virtual nsresult Init() override;
20 virtual nsresult SendCommandLine(const char* aProgram, const char* aProfile,
21 int32_t argc, char** argv,
22 const char* aDesktopStartupID,
23 char** aResponse, bool* aSucceeded) override;
24 void Shutdown();
26 private:
27 bool GetRemoteDestinationName(const char* aProgram, const char* aProfile,
28 nsCString& aDestinationName);
29 nsresult DoSendDBusCommandLine(const char* aProgram, const char* aProfile,
30 const char* aBuffer, int aLength);
31 RefPtr<DBusConnection> mConnection;
34 #endif // DBusRemoteClient_h__