blob: bf0d60960919ae2c559bcfa47d6cb652fbc8f568 [file] [log] [blame]
Andrew de los Reyesd57d1472010-10-21 13:34:08 -07001// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_DBUS_INTERFACE_H__
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_DBUS_INTERFACE_H__
7
8#include <gmock/gmock.h>
9
10#include "update_engine/dbus_interface.h"
11
12namespace chromeos_update_engine {
13
14class MockDbusGlib : public DbusGlibInterface {
15 public:
16 MOCK_METHOD5(ProxyNewForNameOwner, DBusGProxy*(DBusGConnection *connection,
17 const char *name,
18 const char *path,
19 const char *interface,
20 GError **error));
21
22 MOCK_METHOD1(ProxyUnref, void(DBusGProxy* proxy));
23
24 MOCK_METHOD2(BusGet, DBusGConnection*(DBusBusType type, GError **error));
25
26 MOCK_METHOD7(ProxyCall, gboolean(DBusGProxy *proxy,
27 const char *method,
28 GError **error,
29 GType first_arg_type,
30 GType var_arg1,
31 GHashTable** var_arg2,
32 GType var_arg3));
33};
34
35} // namespace chromeos_update_engine
36
37#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_MOCK_DBUS_INTERFACE_H__