Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/toolkit/components/remote/nsDBusRemoteService.h
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim:expandtab:shiftwidth=2:tabstop=2:
3
 */
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/. */
7
8
#ifndef __nsDBusRemoteService_h__
9
#define __nsDBusRemoteService_h__
10
11
#include "nsIRemoteService.h"
12
#include "mozilla/DBusHelpers.h"
13
#include "nsString.h"
14
15
class nsDBusRemoteService final : public nsIRemoteService
16
{
17
public:
18
  // We will be a static singleton, so don't use the ordinary methods.
19
  NS_DECL_ISUPPORTS
20
  NS_DECL_NSIREMOTESERVICE
21
22
  nsDBusRemoteService()
23
    : mConnection(nullptr)
24
    , mAppName(nullptr)
25
0
    { }
26
27
  DBusHandlerResult HandleDBusMessage(DBusConnection *aConnection, DBusMessage *msg);
28
  void UnregisterDBusInterface(DBusConnection *aConnection);
29
30
private:
31
0
  ~nsDBusRemoteService() { }
32
33
  DBusHandlerResult OpenURL(DBusMessage *msg);
34
  DBusHandlerResult Introspect(DBusMessage *msg);
35
36
  // The connection is owned by DBus library
37
  RefPtr<DBusConnection>  mConnection;
38
  nsCString               mAppName;
39
  nsCString               mPathName;
40
};
41
42
#endif // __nsDBusRemoteService_h__