[Tracker] Fixing private headers included from public headers



Hi all,

So I want to try and resolve the problems we have with libtracker-common. More specifically that we don't have a .pc file and it has just ended up being the place we dump common functions used across the code base. We need to decide what headers need to be public in a library with a .pc file for pkgconfig and what should be internal/private.

Most importantly NO public headers (from libraries like libtracker-extract) should include files from private libraries. So far the private libraries are libtracker-common, libtracker-db, libtracker-data and libtracker-fts.

I have listed all the files that reference any header from libtracker-common. I have done this listing for *.h THEN *.c files:

tracker-class.h

  libtracker-data/tracker-sparql-query.c

tracker-config-file.h

  tracker-miner-fs/tracker-config.h
  tracker-store/tracker-config.h
  tracker-status-icon/tracker-icon-config.h
  tracker-writeback/tracker-config.h
  tracker-extract/tracker-config.h
  tracker-extract/tracker-fts-config.h
  libtracker-fts/tracker-fts-config.h

tracker-crc32.h

  libtracker-db/tracker-db-journal.c
  libtracker-common/tracker-crc32.c

tracker-dbus.h

  tracker-store/tracker-events.h
  tracker-store/tracker-resource-class.h
  tracker-store/tracker-writeback.h

  plugins/kmail/tracker-kmail-registrar.c
  libtracker-db/tracker-db-dbus.c
  tracker-miner-fs/tracker-dbus.c
  tracker-miner-fs/tracker-miner-files-reindex.c
  libtracker-miner/tracker-thumbnailer.c
  libtracker-miner/tracker-miner-manager.c
  libtracker-miner/tracker-miner-fs.c
  libtracker-miner/tracker-miner.c
  tracker-store/tracker-dbus.c
  tracker-store/tracker-resources.c
  tracker-store/tracker-statistics.c
  tracker-store/tracker-resource-class.c
  tracker-store/tracker-backup.c
  tracker-store/tracker-store.c
  tracker-writeback/tracker-writeback-consumer.c
  tracker-writeback/tracker-writeback-dispatcher.c
  tracker-extract/tracker-main.c
  tracker-extract/tracker-extract.c
  tracker-extract/tracker-dbus.c

tracker-file-utils.h

  libtracker-db/tracker-db-manager.c
  tracker-miner-fs/tracker-main.c
  tracker-miner-fs/tracker-config.c
  libtracker-miner/tracker-miner-fs.c
  tracker-store/tracker-main.c
  libtracker-data/tracker-data-update.c
  tracker-writeback/tracker-writeback-file.c
  tracker-writeback/tracker-config.c
  libtracker-common/tracker-keyfile-object.c
  tracker-extract/tracker-extract-jpeg.c
  tracker-extract/tracker-extract-flac.c
  tracker-extract/tracker-extract-abw.c
  tracker-extract/tracker-extract-gstreamer.c
  tracker-extract/tracker-extract-png.c
  tracker-extract/tracker-extract-mp3.c
  tracker-extract/tracker-extract-xmp.c
  tracker-extract/tracker-extract-vorbis.c
  tracker-extract/tracker-extract-ps.c
  tracker-extract/tracker-extract-tiff.c

tracker-ioprio.h

  tracker-miner-fs/tracker-main.c
  tracker-store/tracker-main.c
  tracker-extract/tracker-main.c

tracker-keyfile-object.h

  tracker-miner-fs/tracker-config.c
  libtracker-miner/tracker-monitor.c
  tracker-store/tracker-config.c
  tracker-status-icon/tracker-icon-config.c
  tracker-writeback/tracker-config.c
  tracker-extract/tracker-fts-config.c
  tracker-extract/tracker-config.c
  libtracker-fts/tracker-fts-config.c

tracker-language.h

  libtracker-data/tracker-data-query.h
  libtracker-data/tracker-data-manager.h
  libtracker-fts/tracker-parser.h

tracker-log.h

  tracker-miner-fs/tracker-main.c
  libtracker-miner/tracker-miner-fs.c
  tracker-store/tracker-main.c
  tracker-store/tracker-dbus.c
  tracker-store/tracker-resources.c
  tracker-store/tracker-statistics.c
  tracker-writeback/tracker-main.c
  libtracker-common/tracker-ioprio.c
  tracker-extract/tracker-main.c
  tracker-extract/tracker-extract.c

tracker-namespace.h

  libtracker-data/tracker-sparql-query.c

tracker-ontology.h

  libtracker-data/tracker-data-query.h
  libtracker-data/tracker-data-update.h
  libtracker-data/tracker-data-manager.h

  plugins/evolution/tracker-evolution-plugin.c
  libtracker-db/tracker-db-manager.c
  tracker-miner-fs/tracker-main.c
  tracker-miner-fs/tracker-miner-applications.c
  tracker-miner-fs/tracker-miner-files.c
  tracker-store/tracker-main.c
  tracker-store/tracker-dbus.c
  tracker-store/tracker-writeback.c
  tracker-store/tracker-resources.c
  tracker-store/tracker-resource-class.c
  tracker-store/tracker-events.c
  libtracker-data/tracker-sparql-query.c
  libtracker-data/tracker-data-update.c
  tracker-writeback/tracker-writeback-xmp.c
  tracker-writeback/tracker-writeback-mp3.c
  tracker-writeback/tracker-writeback-playlist.c
  libtracker-extract/tracker-xmp.c
  tracker-extract/tracker-extract-libxine.c
  tracker-extract/tracker-extract-jpeg.c
  tracker-extract/tracker-extract-oasis.c
  tracker-extract/tracker-extract-mplayer.c
  tracker-extract/tracker-extract-imagemagick.c
  tracker-extract/tracker-extract-html.c
  tracker-extract/tracker-extract-flac.c
  tracker-extract/tracker-extract-abw.c
  tracker-extract/tracker-extract-pdf.c
  tracker-extract/tracker-extract-gstreamer.c
  tracker-extract/tracker-extract-png.c
  tracker-extract/tracker-extract-mp3.c
  tracker-extract/tracker-extract-xmp.c
  tracker-extract/tracker-extract-msoffice.c
  tracker-extract/tracker-extract-vorbis.c
  tracker-extract/tracker-extract-ps.c
  tracker-extract/tracker-extract-playlist.c
  tracker-extract/tracker-extract-totem.c
  tracker-extract/tracker-extract-tiff.c

tracker-os-dependant.h

  tracker-extract/tracker-extract-oasis.c
  tracker-extract/tracker-extract-mplayer.c
  tracker-extract/tracker-extract-imagemagick.c
  tracker-extract/tracker-main.c
  tracker-extract/tracker-extract-ps.c
  tracker-extract/tracker-extract-totem.c

tracker-power.h

  tracker-miner-fs/tracker-miner-files.c

tracker-property.h

  libtracker-data/tracker-data-query.h

  libtracker-db/tracker-db-manager.c
  libtracker-data/tracker-sparql-query.c

tracker-sparql-builder.h

  libtracker-miner/tracker-miner-fs.h

  plugins/evolution/tracker-evolution-plugin.c

tracker-statement-list.h

  libtracker-extract/tracker-extract.h
  libtracker-extract/tracker-xmp.h

tracker-storage.h

  tracker-miner-fs/tracker-miner-files.c
  tracker-extract/tracker-albumart.c

tracker-type-utils.h

  plugins/evolution/tracker-evolution-plugin.c
  libtracker-db/tracker-db-manager.c
  tracker-miner-fs/tracker-volume-cleanup.c
  tracker-miner-fs/tracker-config.c
  tracker-miner-fs/tracker-miner-files.c
  libtracker-miner/tracker-miner-manager.c
  libtracker-miner/tracker-miner.c
  tracker-store/tracker-resources.c
  libtracker-data/tracker-sparql-query.c
  libtracker-data/tracker-data-update.c
  tracker-writeback/tracker-config.c
  tracker-utils/tracker-status.c
  libtracker-common/tracker-keyfile-object.c
  libtracker-extract/tracker-xmp.c
  libtracker-extract/tracker-iptc.c
  libtracker-extract/tracker-exif.c
  tracker-extract/tracker-extract-jpeg.c
  tracker-extract/tracker-extract-pdf.c
  tracker-extract/tracker-extract-pdf.c
  tracker-extract/tracker-extract-gstreamer.c
  tracker-extract/tracker-extract-png.c
  tracker-extract/tracker-extract-mp3.c
  tracker-extract/tracker-extract-xmp.c
  tracker-extract/tracker-extract-ps.c
  tracker-extract/tracker-extract-tiff.c

tracker-utils.h

  plugins/evolution/tracker-evolution-plugin.c
  libtracker-db/tracker-db-manager.c
  tracker-miner-fs/tracker-miner-applications.c
  tracker-miner-fs/tracker-volume-cleanup.c
  tracker-miner-fs/tracker-miner-files.c
  libtracker-miner/tracker-miner-fs.c
  tracker-store/tracker-dbus.c
  tracker-store/tracker-resources.c
  tracker-store/tracker-push.c
  tracker-writeback/tracker-writeback-xmp.c
  libtracker-extract/tracker-xmp.c
  libtracker-extract/tracker-exif.c
  tracker-extract/tracker-extract-libxine.c
  tracker-extract/tracker-extract-jpeg.c
  tracker-extract/tracker-extract-oasis.c
  tracker-extract/tracker-extract-mplayer.c
  tracker-extract/tracker-extract-flac.c
  tracker-extract/tracker-extract-pdf.c
  tracker-extract/tracker-extract-gstreamer.c
  tracker-extract/tracker-extract-png.c
  tracker-extract/tracker-extract-mp3.c
  tracker-extract/tracker-extract-xmp.c
  tracker-extract/tracker-extract-msoffice.c
  tracker-extract/tracker-extract-vorbis.c
  tracker-extract/tracker-extract-totem.c
  tracker-extract/tracker-extract-tiff.c

--

So these look like they could be moved out of libtracker-common:

  tracker-class
  tracker-namespace
  tracker-power [1]

  [1] This probably shouldn't be moved out since it is useful.

It looks like we need to make these publicly installable for libraries like libtracker-extract, etc:

  tracker-dbus.h (for libtracker-miner)
  tracker-statement-list.h (for libtracker-extract)
  tracker-sparql-builder.h (referenced from tracker-statement-list.h)

The other header files are all used by internal libraries or binaries so they don't need to be in /usr/include.

We can easily make these the only headers that get installed and set up a .pc file. Does everyone sound happy with that approach? The alternative is to create a new library from these - perhaps libtracker-core which is known to be the foundation library for all 3rd party development libraries. Opinions?

With documentation, I wonder how we should tackle this. The current documentation covers a lot more of libtracker-common than just these files. We could of course reduce what we compile in OR keep the reference for people patching tracker? Any preferences here?

--

So based on a consensus, I will be doing the following here:

1. Moving classes which are not needed in libtracker-common
2. Fixing the exposed headers
3. Adding a .pc file
4. Fixing the documentation exposed.

Have I missed anything here?

--
Regards,
Martyn



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]