Bug 41655 - Move KeyFile and possibly ManagerFile out of our public API
Summary: Move KeyFile and possibly ManagerFile out of our public API
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-qt (show other bugs)
Version: git master
Hardware: Other All
: lowest enhancement
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL: http://cgit.collabora.com/git/user/an...
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2011-10-10 09:01 UTC by Olli Salli
Modified: 2011-12-06 08:12 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Olli Salli 2011-10-10 09:01:11 UTC
KeyFile is a, umm, key file parser. Nothing telepathy specific. So doesn't make that much sense in a telepathy library's public API.

ManagerFile is telepathy specific, built on top of the former, but ConnectionManager, ProtocolInfo, Account provide a higher level and better aggregated with info from other sources view to the data which is read from the manager files anyway. So probably should make it internal as well.

Need to study whether somebody actually uses these classes directly, and for what reason.
Comment 1 Andre Moreira Magalhaes 2011-11-24 13:53:48 UTC
Branch at URL attempts to fix this. 

Note that I did not "unexported"(TP_QT_NO_EXPORT) the classes as doing it would break the tests. Should we build key-file/manager-file.cpp in the tests itself?
Comment 2 Olli Salli 2011-11-25 03:35:51 UTC
(In reply to comment #1)
> Branch at URL attempts to fix this. 
> 
> Note that I did not "unexported"(TP_QT_NO_EXPORT) the classes as doing it would
> break the tests. Should we build key-file/manager-file.cpp in the tests itself?

Build as part of the test binaries, without putting to a library in between? Yeah, that'd work I believe. We could actually do the same for TestBackdoors and remove it from tp-qt4 sources completely (unless it links to non-exported, rather than merely protected, but exported, tp-qt4 internal symbols - whether it does that, I can't remember).

You could also have a static library consisting of KeyFile, ManagerFile and TestBackdoors and link that into the relevant tests.

But anyway, just not installing headers for them accomplishes the main goal - to remove them from the API and ABI we support. Even if we still had it in the library private ABI, like TestBackdoors. But please experiment with your idea to see if we could remove them from there too - this would lead to slightly less symbols in the lib, so faster symbol lookup in runtime linking.
Comment 3 Olli Salli 2011-11-25 03:39:02 UTC
(In reply to comment #2)
> You could also have a static library consisting of KeyFile, ManagerFile and
> TestBackdoors and link that into the relevant tests.

Oh and of course don't install it, except if installing the tests.
Comment 4 Olli Salli 2011-11-25 03:39:50 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > You could also have a static library consisting of KeyFile, ManagerFile and
> > TestBackdoors and link that into the relevant tests.
> 
> Oh and of course don't install it, except if installing the tests.

Umm and not even then, because it's static so relevant parts in it will be carried in the test binaries themself.
Comment 5 Andre Moreira Magalhaes 2011-12-06 06:51:39 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Note that I did not "unexported"(TP_QT_NO_EXPORT) the classes as doing it would
> > break the tests. Should we build key-file/manager-file.cpp in the tests itself?
> 
> Build as part of the test binaries, without putting to a library in between?
> Yeah, that'd work I believe. We could actually do the same for TestBackdoors
> and remove it from tp-qt4 sources completely (unless it links to non-exported,
> rather than merely protected, but exported, tp-qt4 internal symbols - whether
> it does that, I can't remember).
> 
> You could also have a static library consisting of KeyFile, ManagerFile and
> TestBackdoors and link that into the relevant tests.
Branch updated adding a new internal static library (telepathy-qt-test-backdoors) that includes ManagerFile, KeyFile and TestBackdoors and is linked by the interested tests.
Comment 6 Olli Salli 2011-12-06 07:45:06 UTC
Yeah very good. I also checked with the KDE Telepathy guys - seems that they are not using these APIs. So away with it please.

My stance is that anybody who's currently using them should be able to port their code to using higher level view of the same data in ConnectionManager and Account (where it is further multiplexed with info from live connections and profile files). If not, we have to add further API exposing the info in those places, not keep the low-level access which is needlessly cumbersome anyway.
Comment 7 Andre Moreira Magalhaes 2011-12-06 08:12:53 UTC
Tnx for the review, changes merged upstream. It will be in tp-qt 0.9.0.


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.