blob: b05834ddd6b3e5e34944a5c506aec0bc63f68010 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
// Copyright 2014 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_UTIL_H_
#define DBUS_UTIL_H_
#include <string>
#include "dbus/dbus_export.h"
namespace dbus {
// Returns the absolute name of a member by concatanating |interface_name| and
// |member_name|. e.g.:
// GetAbsoluteMemberName(
// "org.freedesktop.DBus.Properties",
// "PropertiesChanged")
//
// => "org.freedesktop.DBus.Properties.PropertiesChanged"
//
CHROME_DBUS_EXPORT std::string GetAbsoluteMemberName(
const std::string& interface_name,
const std::string& member_name);
// Similar to base::DeletePointer, but takes void* as an argument.
// Used as DBusFreeFunction.
template<typename T>
void DeleteVoidPointer(void* memory) {
delete static_cast<T*>(memory);
}
} // namespace dbus
#endif // DBUS_UTIL_H_
|