ipc/dbus/RawDBusConnection.h
author Gervase Markham <gerv@gerv.net>
Mon, 17 Sep 2012 10:47:50 +0100
changeset 114085 f59d11079202bae2a329ec4b4e2dd70e55cdd607
parent 108878 f52fe5212d92b1a818a4d8f4740f6418a0d5c218
child 146101 6e0a3783458b6d93cbd131fbaf943f9e8fc78e69
permissions -rw-r--r--
Bug 763623 - Add AUTHORS file.

/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef mozilla_ipc_dbus_gonk_rawdbusconnection_h__
#define mozilla_ipc_dbus_gonk_rawdbusconnection_h__

#include <string.h>
#include <stdint.h>
#include <stdio.h>
#include <string>
#include <stdlib.h>
#include "nscore.h"
#include "mozilla/Scoped.h"

struct DBusConnection;

namespace mozilla {
namespace ipc {

class RawDBusConnection
{
  struct ScopedDBusConnectionPtrTraits : ScopedFreePtrTraits<DBusConnection>
  {
    static void release(DBusConnection* ptr);
  };

public:
  RawDBusConnection();
  ~RawDBusConnection();
  nsresult EstablishDBusConnection();
  DBusConnection* GetConnection() {
    return mConnection;
  }
protected:
  Scoped<ScopedDBusConnectionPtrTraits> mConnection;
};

}
}

#endif