forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Object Manager is a new standard D-Bus interface, closely related to the Properties interface. It is used by BlueZ 5.x thus the need to implement it now. The intended use is that Chrome D-Bus Client singletons set up a link to an object manager in their constructor and register themselves to handle their particular interface. BUG=220951 TEST=dbus_unittests Review URL: https://codereview.chromium.org/12491014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190440 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
keybuk@chromium.org
committed
Mar 25, 2013
1 parent
dbc220a
commit 9cc40cb
Showing
13 changed files
with
1,314 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#include "dbus/mock_object_manager.h" | ||
|
||
namespace dbus { | ||
|
||
MockObjectManager::MockObjectManager(Bus* bus, | ||
const std::string& service_name, | ||
const ObjectPath& object_path) | ||
: ObjectManager(bus, service_name, object_path) { | ||
} | ||
|
||
MockObjectManager::~MockObjectManager() { | ||
} | ||
|
||
} // namespace dbus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// Copyright (c) 2013 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef DBUS_MOCK_OBJECT_MANAGER_H_ | ||
#define DBUS_MOCK_OBJECT_MANAGER_H_ | ||
|
||
#include <string> | ||
|
||
#include "dbus/message.h" | ||
#include "dbus/object_manager.h" | ||
#include "dbus/object_path.h" | ||
#include "dbus/object_proxy.h" | ||
#include "testing/gmock/include/gmock/gmock.h" | ||
|
||
namespace dbus { | ||
|
||
// Mock for ObjectManager. | ||
class MockObjectManager : public ObjectManager { | ||
public: | ||
MockObjectManager(Bus* bus, | ||
const std::string& service_name, | ||
const ObjectPath& object_path); | ||
|
||
MOCK_METHOD2(RegisterInterface, void(const std::string&, | ||
Interface*)); | ||
MOCK_METHOD1(UnregisterInterface, void(const std::string&)); | ||
MOCK_METHOD0(GetObjects, std::vector<ObjectPath>()); | ||
MOCK_METHOD1(GetObjectsWithInterface, | ||
std::vector<ObjectPath>(const std::string&)); | ||
MOCK_METHOD1(GetObjectProxy, ObjectProxy*(const ObjectPath&)); | ||
MOCK_METHOD2(GetProperties, PropertySet*(const ObjectPath&, | ||
const std::string&)); | ||
MOCK_METHOD0(GetManagedObjects, void()); | ||
|
||
protected: | ||
virtual ~MockObjectManager(); | ||
}; | ||
|
||
} // namespace dbus | ||
|
||
#endif // DBUS_MOCK_OBJECT_MANAGER_H_ |
Oops, something went wrong.