Bug 25235 - single include telepathy-glib.h
Summary: single include telepathy-glib.h
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/da...
Whiteboard: review+
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-22 16:27 UTC by Danielle Madeley
Modified: 2009-11-24 12:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Danielle Madeley 2009-11-22 16:27:45 UTC
http://git.collabora.co.uk/?p=user/danni/telepathy-glib.git;a=shortlog;h=refs/heads/unified-header

Proposed includes:
+#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/enums.h>
+#include <telepathy-glib/errors.h>
+#include <telepathy-glib/util.h>
+
+#include <telepathy-glib/dbus.h>
+#include <telepathy-glib/channel.h>
+#include <telepathy-glib/connection.h>
+#include <telepathy-glib/connection-manager.h>
+#include <telepathy-glib/account.h>
+#include <telepathy-glib/account-manager.h>
+#include <telepathy-glib/handle.h>
+#include <telepathy-glib/contact.h>
+#include <telepathy-glib/debug.h>
+
+#include <telepathy-glib/svc-generic.h>
+#include <telepathy-glib/svc-client.h>

Which are the headers that most Telepathy clients will want to include.

Adding this header through the examples in examples/ increases the average compile time from 17.3s to 19s on my laptop.
Comment 1 Simon McVittie 2009-11-23 02:52:01 UTC
I'd add at least defs.h to that.

intset.h, proxy.h and dbus-daemon.h are automatically included by some of those headers but explicitly including them would be better.

heap.h is uncommonly used, but is small and self-contained, so I'd add that too.

Possibly also: channel-dispatcher.h, channel-dispatch-operation.h, channel-request.h.
Comment 2 Jonny Lamb 2009-11-23 04:11:11 UTC
(In reply to comment #1)
> intset.h, proxy.h and dbus-daemon.h are automatically included by some of those
> headers but explicitly including them would be better.

Bear in mind that at least dbus-daemon.h errors if you include it directly:

    #error dbus-daemon.h not to be used directly, #include <telepathy-glib/dbus.h>
Comment 3 Simon McVittie 2009-11-23 04:39:07 UTC
Ah, OK, that was how I handled that split. Ignore dbus-daemon.h then :-)

(Similarly, verify.h is officially part of util.h)
Comment 4 Danielle Madeley 2009-11-23 16:44:20 UTC
Ok. Updated based on this feedback.

List is:

interfaces.h
gtypes.h
enums.h
errors.h
util.h
defs.h
intset.h
heap.h

proxy.h
dbus.h
channel.h
connection.h
connection-manager.h
account.h
account-manager.h
channel-dispatcher.h
channel-dispatch-operation.h
channel-request.h
handle.h
contact.h
debug.h

svc-generic.h
svc-client.h
Comment 5 Simon McVittie 2009-11-24 04:35:05 UTC
Looks good to merge.
Comment 6 Danielle Madeley 2009-11-24 12:26:05 UTC
Cool done.

We should go through and add the gtk-doc @Include directive around the place, so people know what file to include.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.