Line data Source code
1 : /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 : /* vim: set ts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 : * You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef mozilla_ipc_DBusPendingCallRefPtr_h
8 : #define mozilla_ipc_DBusPendingCallRefPtr_h
9 :
10 : #include <dbus/dbus.h>
11 : #include "mozilla/RefPtr.h"
12 :
13 : namespace mozilla {
14 :
15 : template<>
16 : struct RefPtrTraits<DBusPendingCall>
17 : {
18 : static void AddRef(DBusPendingCall* aPendingCall) {
19 : MOZ_ASSERT(aPendingCall);
20 : dbus_pending_call_ref(aPendingCall);
21 : }
22 0 : static void Release(DBusPendingCall* aPendingCall) {
23 0 : MOZ_ASSERT(aPendingCall);
24 0 : dbus_pending_call_unref(aPendingCall);
25 0 : }
26 : };
27 :
28 : } // namespace mozilla
29 :
30 : #endif // mozilla_ipc_DBusPendingCallRefPtr_h
|