tdebluez
synchronization1Proxy.cpp
Go to the documentation of this file.
1 // File autogenerated
2 
3 // declaration include
5 
6 // TQt includes
7 #include <tqstring.h>
8 
9 // TQt D-Bus includes
10 #include <tqdbuserror.h>
11 #include <tqdbusmessage.h>
12 #include <tqdbusobjectpath.h>
13 #include <tqdbusproxy.h>
14 
15 
16 namespace org
17 {
18 namespace bluez
19 {
20 namespace obex
21 {
22 
23 Synchronization1Proxy::Synchronization1Proxy(const TQString& service, const TQString& path, TQObject* parent, const char* name)
24  : TQObject(parent, name),
25  m_baseProxy(new TQT_DBusProxy())
26 {
27  m_baseProxy->setInterface("org.bluez.obex.Synchronization1");
28  m_baseProxy->setPath(path);
29  m_baseProxy->setService(service);
30 
31 }
32 
34 {
35  delete m_baseProxy;
36 }
37 
38 void Synchronization1Proxy::setConnection(const TQT_DBusConnection& connection)
39 {
40  m_baseProxy->setConnection(connection);
41 }
42 
43 bool Synchronization1Proxy::SetLocation(const TQString& location, TQT_DBusError& error)
44 {
45  TQValueList<TQT_DBusData> parameters;
46 
47  parameters << TQT_DBusData::fromString(location);
48 
49  TQT_DBusMessage reply = m_baseProxy->sendWithReply("SetLocation", parameters, &error);
50 
51  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
52  return true;
53 }
54 
55 bool Synchronization1Proxy::GetPhonebook(TQT_DBusObjectPath& phonebook, const TQString& sourcefile, const TQString& targetfile, TQT_DBusError& error)
56 {
57  TQValueList<TQT_DBusData> parameters;
58 
59  parameters << TQT_DBusData::fromString(sourcefile);
60  parameters << TQT_DBusData::fromString(targetfile);
61 
62  TQT_DBusMessage reply = m_baseProxy->sendWithReply("GetPhonebook", parameters, &error);
63 
64  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
65 
66  if (reply.count() != 1) return false;
67 
68  bool ok = false;
69 
70  phonebook = reply.front().toObjectPath(&ok);
71  if (!ok) return false;
72 
73  return true;
74 }
75 
76 bool Synchronization1Proxy::PutPhonebook(const TQString& sourcefile, TQT_DBusError& error)
77 {
78  TQValueList<TQT_DBusData> parameters;
79 
80  parameters << TQT_DBusData::fromString(sourcefile);
81 
82  TQT_DBusMessage reply = m_baseProxy->sendWithReply("PutPhonebook", parameters, &error);
83 
84  if (reply.type() != TQT_DBusMessage::ReplyMessage) return false;
85  return true;
86 }
87 
88 }; // namespace obex
89 
90 }; // namespace bluez
91 
92 }; // namespace org
93 
94 #include "synchronization1Proxy.moc"
95 
96 // End of File
97 
virtual bool PutPhonebook(const TQString &sourcefile, TQT_DBusError &error)
virtual bool GetPhonebook(TQT_DBusObjectPath &phonebook, const TQString &sourcefile, const TQString &targetfile, TQT_DBusError &error)
void setConnection(const TQT_DBusConnection &connection)
virtual bool SetLocation(const TQString &location, TQT_DBusError &error)
Synchronization1Proxy(const TQString &service, const TQString &path, TQObject *parent=0, const char *name=0)