ipc/dbus/RawDBusConnection.h
author Eric Chou <echou@mozilla.com>
Tue, 21 Aug 2012 11:21:24 +0800
changeset 108878 f52fe5212d92b1a818a4d8f4740f6418a0d5c218
parent 107827 8045e57e00dd2e6875006499f63026532ae6246f
child 146101 6e0a3783458b6d93cbd131fbaf943f9e8fc78e69
permissions -rw-r--r--
Bug 783932 - [b2g-bluetooth] Fix wrong textwidth(tw=) value in Mode line, r=qdot

/* -*- 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