~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-common/libs/dbus-c++/src/interface.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
using namespace DBus;
34
34
 
35
35
Interface::Interface (const std::string &name)
36
 
        : _name (name)
37
 
{}
38
 
 
39
 
Interface::~Interface()
40
 
{}
41
 
 
42
 
InterfaceAdaptor *AdaptorBase::find_interface (const std::string &name)
43
 
{
 
36
        : _name (name) {}
 
37
 
 
38
Interface::~Interface() {}
 
39
 
 
40
InterfaceAdaptor *AdaptorBase::find_interface (const std::string &name) {
44
41
    InterfaceAdaptorTable::const_iterator ii = _interfaces.find (name);
45
42
 
46
43
    return ii != _interfaces.end() ? ii->second : NULL;
47
44
}
48
45
 
49
46
InterfaceAdaptor::InterfaceAdaptor (const std::string &name)
50
 
        : Interface (name)
51
 
{
 
47
        : Interface (name) {
52
48
    debug_log ("adding interface %s", name.c_str());
53
49
 
54
50
    _interfaces[name] = this;
55
51
}
56
52
 
57
 
Message InterfaceAdaptor::dispatch_method (const CallMessage &msg)
58
 
{
 
53
Message InterfaceAdaptor::dispatch_method (const CallMessage &msg) {
59
54
    const char *name = msg.member();
60
55
 
61
56
    MethodTable::iterator mi = _methods.find (name);
67
62
    }
68
63
}
69
64
 
70
 
void InterfaceAdaptor::emit_signal (const SignalMessage &sig)
71
 
{
 
65
void InterfaceAdaptor::emit_signal (const SignalMessage &sig) {
72
66
    SignalMessage &sig2 = const_cast<SignalMessage &> (sig);
73
67
 
74
68
    if (sig2.interface() == NULL)
77
71
    _emit_signal (sig2);
78
72
}
79
73
 
80
 
Variant *InterfaceAdaptor::get_property (const std::string &name)
81
 
{
 
74
Variant *InterfaceAdaptor::get_property (const std::string &name) {
82
75
    PropertyTable::iterator pti = _properties.find (name);
83
76
 
84
77
    if (pti != _properties.end()) {
91
84
    return NULL;
92
85
}
93
86
 
94
 
void InterfaceAdaptor::set_property (const std::string &name, Variant &value)
95
 
{
 
87
void InterfaceAdaptor::set_property (const std::string &name, Variant &value) {
96
88
    PropertyTable::iterator pti = _properties.find (name);
97
89
 
98
90
    if (pti != _properties.end()) {
112
104
    throw ErrorFailed ("requested property not found");
113
105
}
114
106
 
115
 
InterfaceProxy *ProxyBase::find_interface (const std::string &name)
116
 
{
 
107
InterfaceProxy *ProxyBase::find_interface (const std::string &name) {
117
108
    InterfaceProxyTable::const_iterator ii = _interfaces.find (name);
118
109
 
119
110
    return ii != _interfaces.end() ? ii->second : NULL;
120
111
}
121
112
 
122
113
InterfaceProxy::InterfaceProxy (const std::string &name)
123
 
        : Interface (name)
124
 
{
 
114
        : Interface (name) {
125
115
    debug_log ("adding interface %s", name.c_str());
126
116
 
127
117
    _interfaces[name] = this;
128
118
}
129
119
 
130
 
bool InterfaceProxy::dispatch_signal (const SignalMessage &msg)
131
 
{
 
120
bool InterfaceProxy::dispatch_signal (const SignalMessage &msg) {
132
121
    const char *name = msg.member();
133
122
 
134
123
    SignalTable::iterator si = _signals.find (name);
145
134
    }
146
135
}
147
136
 
148
 
Message InterfaceProxy::invoke_method (const CallMessage &call)
149
 
{
 
137
Message InterfaceProxy::invoke_method (const CallMessage &call) {
150
138
    CallMessage &call2 = const_cast<CallMessage &> (call);
151
139
 
152
140
    if (call.interface() == NULL)
155
143
    return _invoke_method (call2);
156
144
}
157
145
 
158
 
bool InterfaceProxy::invoke_method_noreply (const CallMessage &call)
159
 
{
 
146
bool InterfaceProxy::invoke_method_noreply (const CallMessage &call) {
160
147
    CallMessage &call2 = const_cast<CallMessage &> (call);
161
148
 
162
149
    if (call.interface() == NULL)