ipc/dbus/DBusThread.h
author Henri Sivonen <hsivonen@hsivonen.fi>
Wed, 16 Oct 2013 04:46:10 +0300
changeset 150948 2ba9f3b24b8a54fd3a76a8aa91b6fc56d395c755
parent 133750 ca22a8f84a428b59211a1fd78c2481186d05c764
child 160138 905ce734b772a657ede8c05f4a5213bb0bd766f9
permissions -rw-r--r--
Bug 871161 - Stop inheriting charset where other browsers do not inherit it. r=bzbarsky.

/* -*- 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_dbusthread_h__
#define mozilla_ipc_dbus_gonk_dbusthread_h__

#include "nscore.h"

class nsIRunnable;

namespace mozilla {
namespace ipc {

/**
 * Starts the DBus thread, which handles returning signals to objects
 * that call asynchronous functions. This should be called from the
 * main thread at startup.
 *
 * @return True on thread starting correctly, false otherwise
 */
bool StartDBus();

/**
 * Stop the DBus thread, assuming it's currently running. Should be
 * called from main thread.
 *
 * @return True on thread stopping correctly, false otherwise
 */
bool StopDBus();

/**
 * Dispatch an event to the DBus thread
 *
 * @param event An nsIRunnable to run in the DBus thread
 * @return NS_OK on success, or an error code otherwise
 */
nsresult
DispatchToDBusThread(nsIRunnable* event);

}
}

#endif