1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim:expandtab:shiftwidth=4:tabstop=4:
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/. */
11 #ifdef MOZ_ENABLE_DBUS
13 # include "mozilla/RefPtr.h"
14 # include "mozilla/GRefPtr.h"
17 #include "nsBaseAppShell.h"
20 class nsAppShell
: public nsBaseAppShell
{
22 nsAppShell() : mTag(0) { mPipeFDs
[0] = mPipeFDs
[1] = 0; }
24 // nsBaseAppShell overrides:
26 virtual void ScheduleNativeEventCallback() override
;
27 virtual bool ProcessNextNativeEvent(bool mayWait
) override
;
29 #ifdef MOZ_ENABLE_DBUS
30 void StartDBusListening();
31 void StopDBusListening();
33 static void DBusSessionSleepCallback(GDBusProxy
* aProxy
, gchar
* aSenderName
,
35 GVariant
* aParameters
,
37 static void DBusTimedatePropertiesChangedCallback(GDBusProxy
* aProxy
,
40 GVariant
* aParameters
,
42 static void DBusConnectClientResponse(GObject
* aObject
, GAsyncResult
* aResult
,
47 virtual ~nsAppShell();
49 static gboolean
EventProcessorCallback(GIOChannel
* source
,
50 GIOCondition condition
, gpointer data
);
54 #ifdef MOZ_ENABLE_DBUS
55 RefPtr
<GDBusProxy
> mLogin1Proxy
;
56 RefPtr
<GCancellable
> mLogin1ProxyCancellable
;
57 RefPtr
<GDBusProxy
> mTimedate1Proxy
;
58 RefPtr
<GCancellable
> mTimedate1ProxyCancellable
;
62 #endif /* nsAppShell_h__ */