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 __nsDBusRemoteServer_h__
9 #define __nsDBusRemoteServer_h__
11 #include "nsRemoteServer.h"
12 #include "nsUnixRemoteServer.h"
13 #include "mozilla/DBusHelpers.h"
14 #include "mozilla/Span.h"
17 #include "mozilla/RefPtr.h"
18 #include "mozilla/GRefPtr.h"
20 class nsDBusRemoteServer final
: public nsRemoteServer
,
21 public nsUnixRemoteServer
{
23 ~nsDBusRemoteServer() override
{ Shutdown(); }
25 nsresult
Startup(const char* aAppName
, const char* aProfileName
) override
;
26 void Shutdown() override
;
28 void OnBusAcquired(GDBusConnection
* aConnection
);
29 void OnNameAcquired(GDBusConnection
* aConnection
);
30 void OnNameLost(GDBusConnection
* aConnection
);
32 bool HandleOpenURL(const gchar
* aInterfaceName
, const gchar
* aMethodName
,
33 mozilla::Span
<const gchar
> aParam
);
37 uint mRegistrationId
= 0;
38 GDBusConnection
* mConnection
= nullptr;
39 RefPtr
<GDBusNodeInfo
> mIntrospectionData
;
45 #endif // __nsDBusRemoteServer_h__