[Telepathy-commits] [telepathy-qt4/master] TpPrototype::StreamedMediaChannel: arrange headers according to Telepathy coding style

Simon McVittie simon.mcvittie at collabora.co.uk
Wed Dec 10 06:56:42 PST 2008


- don't include generated headers directly, use the public-API wrappers
- use the full name of the header (TelepathyQt4/...)
- #include the header for this translation unit first, to verify that
  it is self-contained
- put the least specialized libraries first (Qt then Tp-Qt4 then
  Prototype)

See http://telepathy.freedesktop.org/wiki/Style for rationale for some
of this.
---
 TelepathyQt4/Prototype/StreamedMediaChannel.cpp |   27 +++++++++++------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/TelepathyQt4/Prototype/StreamedMediaChannel.cpp b/TelepathyQt4/Prototype/StreamedMediaChannel.cpp
index 5008fce..1eb8518 100644
--- a/TelepathyQt4/Prototype/StreamedMediaChannel.cpp
+++ b/TelepathyQt4/Prototype/StreamedMediaChannel.cpp
@@ -19,23 +19,24 @@
  * License along with this library; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
-#include "ContactManager.h"
+#include "TelepathyQt4/Prototype/StreamedMediaChannel.h"
 
-#include "ConnectionFacade.h"
+#include <QDebug>
+#include <QMetaProperty>
 
-#include <TelepathyQt4/Prototype/StreamedMediaChannel.h>
-#include <TelepathyQt4/Prototype/Contact.h>
-#include <TelepathyQt4/Prototype/Constants>
 #include <TelepathyQt4/Client/Connection>
 #include <TelepathyQt4/Client/Channel>
 
-// The following two header files are related to the stream engine which is used as backend.
-// These interfaces do not belong to telepathy!
-#include "_gen/cli-channel-handler.h"
-#include "_gen/cli-stream-engine.h"
+// ChannelHandlerInterface and StreamEngineInterface from stream-engine
+// 0.5.x, which is currently used as the only media streaming backend.
+// These interfaces are not really part of the Telepathy spec
+#include <TelepathyQt4/Prototype/Client/ChannelHandler>
+#include <TelepathyQt4/Prototype/Client/StreamEngine>
 
-#include <QDebug>
-#include <QMetaProperty>
+#include <TelepathyQt4/Prototype/ConnectionFacade.h>
+#include <TelepathyQt4/Prototype/Constants>
+#include <TelepathyQt4/Prototype/Contact.h>
+#include <TelepathyQt4/Prototype/ContactManager.h>
 
 #define ENABLE_DEBUG_OUTPUT_
 
@@ -816,6 +817,4 @@ void StreamedMediaChannel::slotMembersChanged( const QString& message,
     }
 }
 
-#include "_gen/StreamedMediaChannel.h.moc"
-
-
+#include "TelepathyQt4/Prototype/_gen/StreamedMediaChannel.h.moc"
-- 
1.5.6.5




More information about the Telepathy-commits mailing list