Home · All Classes · All Namespaces · Modules · Functions · Files
base-call.h
1 
23 #ifndef _TelepathyQt_base_call_h_HEADER_GUARD_
24 #define _TelepathyQt_base_call_h_HEADER_GUARD_
25 
26 #ifndef IN_TP_QT_HEADER
27 #error IN_TP_QT_HEADER
28 #endif
29 
30 
31 #include <TelepathyQt/DBusService>
32 #include <TelepathyQt/Global>
33 #include <TelepathyQt/Types>
34 #include <TelepathyQt/Callbacks>
35 #include <TelepathyQt/Constants>
36 #include <TelepathyQt/BaseChannel>
37 
38 #include <QDBusConnection>
39 
40 class QString;
41 
42 namespace Tp
43 {
44 
46 {
47  Q_OBJECT
48  Q_DISABLE_COPY(AbstractCallContentInterface)
49 
50 public:
51  AbstractCallContentInterface(const QString &interfaceName);
53 
54 private:
55  friend class BaseCallContent;
56 
57  class Private;
58  friend class Private;
59  Private *mPriv;
60 };
61 
62 class TP_QT_EXPORT BaseCallContent : public DBusService
63 {
64  Q_OBJECT
65  Q_DISABLE_COPY(BaseCallContent)
66 
67 public:
68  static BaseCallContentPtr create(const QDBusConnection &dbusConnection,
69  BaseChannel* channel,
70  const QString &name,
71  const Tp::MediaStreamType &type,
72  const Tp::MediaStreamDirection &direction) {
73  return BaseCallContentPtr(new BaseCallContent(dbusConnection, channel, name, type, direction));
74  }
75 
76  virtual ~BaseCallContent();
77  QVariantMap immutableProperties() const;
78  bool registerObject(DBusError *error = NULL);
79  virtual QString uniqueName() const;
80 
81  QList<AbstractCallContentInterfacePtr> interfaces() const;
82  AbstractCallContentInterfacePtr interface(const QString &interfaceName) const;
83  bool plugInterface(const AbstractCallContentInterfacePtr &interface);
84 
85  QString name() const;
86  Tp::MediaStreamType type() const;
87  Tp::CallContentDisposition disposition() const;
88  Tp::ObjectPathList streams() const;
89 protected:
90  BaseCallContent(const QDBusConnection &dbusConnection,
91  BaseChannel* channel,
92  const QString &name,
93  const Tp::MediaStreamType &type,
94  const Tp::MediaStreamDirection &direction);
95 
96  virtual bool registerObject(const QString &busName, const QString &objectPath,
97  DBusError *error);
98  void remove();
99 
100 private:
101  class Adaptee;
102  friend class Adaptee;
103  struct Private;
104  friend struct Private;
105  Private *mPriv;
106 };
107 
109 {
110  Q_OBJECT
111  Q_DISABLE_COPY(BaseCallMuteInterface)
112 
113 public:
114  static BaseCallMuteInterfacePtr create() {
115  return BaseCallMuteInterfacePtr(new BaseCallMuteInterface());
116  }
117  template<typename BaseCallMuteInterfaceSubclass>
120  new BaseCallMuteInterfaceSubclass());
121  }
122  virtual ~BaseCallMuteInterface();
123 
124  QVariantMap immutableProperties() const;
125 
126  Tp::LocalMuteState localMuteState() const;
127  void setMuteState(const Tp::LocalMuteState &state);
128 
130  void setSetMuteStateCallback(const SetMuteStateCallback &cb);
131 Q_SIGNALS:
132  void muteStateChanged(const Tp::LocalMuteState &state);
133 private:
135  void createAdaptor();
136 
137  class Adaptee;
138  friend class Adaptee;
139  struct Private;
140  friend struct Private;
141  Private *mPriv;
142 };
143 
145 {
146  Q_OBJECT
147  Q_DISABLE_COPY(BaseCallContentDTMFInterface)
148 
149 public:
150  static BaseCallContentDTMFInterfacePtr create() {
151  return BaseCallContentDTMFInterfacePtr(new BaseCallContentDTMFInterface());
152  }
153  template<typename BaseCallContentDTMFInterfaceSubclass>
156  new BaseCallContentDTMFInterfaceSubclass());
157  }
158  virtual ~BaseCallContentDTMFInterface();
159 
160  QVariantMap immutableProperties() const;
161 
162  bool currentlySendingTones() const;
163  void setCurrentlySendingTones(bool sendingTones);
164 
165  QString deferredTones() const;
166  void setDeferredTones(const QString &deferredTones);
167 
168 
170  void setStartToneCallback(const StartToneCallback &cb);
172  void setStopToneCallback(const StopToneCallback &cb);
174  void setMultipleTonesCallback(const MultipleTonesCallback &cb);
175 Q_SIGNALS:
176 
177 private:
179  void createAdaptor();
180 
181  class Adaptee;
182  friend class Adaptee;
183  struct Private;
184  friend struct Private;
185  Private *mPriv;
186 };
187 
188 
189 }
190 #endif
MediaStreamType
Definition: build/TelepathyQt/_gen/constants.h:2716
Base class for D-Bus service interfaces.
Definition: dbus-service.h:73
static BaseCallContentDTMFInterfacePtr create()
Definition: base-call.h:150
Base class for all the Channel object interface implementations.
Definition: base-channel.h:95
static BaseCallContentPtr create(const QDBusConnection &dbusConnection, BaseChannel *channel, const QString &name, const Tp::MediaStreamType &type, const Tp::MediaStreamDirection &direction)
Definition: base-call.h:68
Base class for implementations of Call.Interface.Mute.
Definition: base-call.h:108
Callback2< void, const QString &, DBusError * > MultipleTonesCallback
Definition: base-call.h:173
LocalMuteState
Definition: build/TelepathyQt/_gen/constants.h:4626
Base class for D-Bus services.
Definition: dbus-service.h:46
The SharedPtr class is a pointer to an explicitly shared object.
Definition: shared-ptr.h:39
static SharedPtr< BaseCallMuteInterfaceSubclass > create()
Definition: base-call.h:118
Base class for all the CallContent object interface implementations.
Definition: base-call.h:45
Callback1< void, DBusError * > StopToneCallback
Definition: base-call.h:171
Base class for implementations of Call.Content.Interface.DTMF.
Definition: base-call.h:144
Definition: build/TelepathyQt/_gen/types.h:81
Small container class, containing a D-Bus error.
Definition: dbus-error.h:35
MediaStreamDirection
Definition: build/TelepathyQt/_gen/constants.h:2777
static BaseCallMuteInterfacePtr create()
Definition: base-call.h:114
Callback2< void, const Tp::LocalMuteState &, DBusError * > SetMuteStateCallback
Definition: base-call.h:129
Definition: base-call.h:62
CallContentDisposition
Definition: build/TelepathyQt/_gen/constants.h:4241
Base class for channel implementations.
Definition: base-channel.h:42
static SharedPtr< BaseCallContentDTMFInterfaceSubclass > create()
Definition: base-call.h:154
Callback2< void, uchar, DBusError * > StartToneCallback
Definition: base-call.h:169


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt 0.9.6.1