summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-13service: fix doc typoHEADmasterGuillaume Desmottes1-1/+1
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4294
2016-09-13doc: move general object description as SECTIONGuillaume Desmottes6-14/+73
Best to have the general overview of the object at the top of the doc file. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4293
2016-09-13README: add some infoGuillaume Desmottes1-0/+44
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4292
2016-09-13debian: add 'dbus' as build depGuillaume Desmottes1-0/+1
2f4e37f4146f9d28e90d057f5e2a604789793088 is not enough, we also need 'dbus' when building the package as the tests as also run at this point. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Héctor Orón Martínez <hector.oron@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4304
2016-09-13debian: add dep on dbus to libtraprain-0-testsGuillaume Desmottes1-0/+1
The tests are using 'dbus-daemon' to spawn a bus. This binary is part of the dbus package. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Héctor Orón Martínez <hector.oron@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4303
2016-09-13debian: run tests with VERBOSE=1Guillaume Desmottes1-0/+3
Make debbugging easier when tests are failing in the QA/CI system as we can see what is actually failing. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4302
2016-09-13pre-release packaging/CI fixesGuillaume Desmottes3-1/+12
Fixes to integrate Traprain into Apertis's QA and CI system. - Need a 'NEWS' file so 'make distcheck' can pass. - Create a debian/changelog so we can build pre-release packages. - When building from not released version, ChangeLog is generated during the build process. Update extend-diff-ignore so dpkg-buildpackage won't complain about it. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4301
2016-09-13test-mock-service: clean routes when starting testsGuillaume Desmottes1-0/+24
Fix installed test which is the real service. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4288
2016-09-13mock-service: add ClearRoutes() APIGuillaume Desmottes6-0/+187
I'm going to use it to make sure the installed tests are running from a clean state when using the real mock service. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4287
2016-09-13test-mock-service: factor out set_current_route()Guillaume Desmottes1-11/+15
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4286
2016-09-13test-mock-service: factor out add_route()Guillaume Desmottes1-26/+23
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4285
2016-09-09debian: initial packaging supportGuillaume Desmottes24-0/+717
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4197
2016-09-09doc: make the doc parallel installableGuillaume Desmottes1-3/+3
Do this by adding the API version in the hotdoc project name. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4283
2016-09-09mock-service: add test as approved clientGuillaume Desmottes1-0/+3
Needed when running the installed test in a real environment. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4282
2016-09-09mock-service: add apparmor profile for test-mock-serviceGuillaume Desmottes2-0/+21
Needed to allow it to communicate with the service when running in a real environment. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4281
2016-09-09mock-service: add D-Bus config fileGuillaume Desmottes2-0/+26
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4280
2016-09-09mock-service: fix path of binary in apparmor profileGuillaume Desmottes1-1/+1
The service is now installed in bindir. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4279
2016-09-09mock-service: add sysusers.d fileGuillaume Desmottes2-0/+21
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4278
2016-09-09mock-service: fix install path of the systemd service fileGuillaume Desmottes2-3/+8
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4277
2016-09-09mock-service: run on the system busGuillaume Desmottes7-16/+57
We are moving Traprain to the system bus as it's closer to a system service than a user one. Adding a command line option to the mock service to keep running on the session bus for easy testing. The service is tested in real condition (on the system bus) when running the installed test. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4276
2016-09-09client: pass a GDBusConnection when creating mock service clientGuillaume Desmottes3-7/+80
This will allow us to use the session bus when running tests even if the service is actually supposed to use the system one. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4275
2016-09-09service: pass a GDBusConnection when creating serviceGuillaume Desmottes5-43/+114
This will allow us to use the session bus when running tests even if the service is actually supposed to use the system one. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4274
2016-09-09client: pass a GDBusConnection when creating clientGuillaume Desmottes4-11/+84
This will allow us to use the session bus when running tests even if the service is actually supposed to use the system one. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4273
2016-09-08common: add trp_languages_map_get()Guillaume Desmottes3-1/+70
Users need a way to iterate over all the translations of a string. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4209
2016-09-08common: remove _trp_languages_map_to_hash()Guillaume Desmottes2-21/+0
No longer needed. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4208
2016-09-08client: expose segment descriptions using TrpLanguagesMapGuillaume Desmottes3-36/+26
Getting rid of the 'geo_desc_hash' temporary hack. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4207
2016-09-08client: expose the title as a TrpLanguagesMapGuillaume Desmottes3-10/+12
TrpLanguagesMap is part of the API so we can use it directly now. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4206
2016-09-08common: make trp_languages_map_lookup() publicGuillaume Desmottes4-7/+19
Needed by users to lookup strings from the map. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4205
2016-09-08common: make TrpLanguagesMap publicGuillaume Desmottes7-31/+66
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4204
2016-09-08client: use a _TrpLanguagesMap to store the segment descriptionsGuillaume Desmottes3-34/+29
The introduction of 'geo_desc_hash' isn't great, but it's just temporary while refactoring. I'll get rid of it in a few commits. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4203
2016-09-08client: use a _TrpLanguagesMap to store the titlesGuillaume Desmottes2-14/+15
First step to start using the languages map in the client side API. _TrpLanguagesMap is a more efficient container saving us from the GHashTable overhead and not dupping the language strings. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4202
2016-09-08common: add _trp_languages_map_to_hash()Guillaume Desmottes2-0/+21
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4201
2016-09-08common: add _trp_languages_map_lookup()Guillaume Desmottes2-0/+29
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4200
2016-09-08common: add _trp_languages_map_new_from_variant()Guillaume Desmottes2-0/+23
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4199
2016-09-06mock-service: add apparmor policy fileGuillaume Desmottes2-0/+60
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4186
2016-09-06mock-service: add systemd service fileGuillaume Desmottes3-0/+46
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4185
2016-09-06mock-service: implement SetCurrentRoute()Guillaume Desmottes4-10/+202
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4184
2016-09-06mock-service: implement RemoveRoute()Guillaume Desmottes4-0/+188
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4183
2016-09-06mock-service: implement AddRoute()Guillaume Desmottes2-4/+167
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4182
2016-09-06test: move client route checking to test-helperGuillaume Desmottes4-120/+126
I'm about to use it in the muck service tests as well. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4181
2016-09-06client: API to add routes to the mock service client libGuillaume Desmottes9-21/+262
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4180
2016-09-06client: add TrpClientMockGuillaume Desmottes4-0/+350
Client-side API to control the mock service. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4179
2016-09-06mock-service: add D-Bus APIGuillaume Desmottes2-4/+90
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4178
2016-09-06mock-service: start implementing mock serviceGuillaume Desmottes11-1/+414
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4177
2016-09-06service: add trp_service_navigation_get_n_routes()Guillaume Desmottes3-0/+30
Will be used by the mock service. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4174
2016-09-06tests_: add a static lib containing test-helperGuillaume Desmottes1-4/+31
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4173
2016-09-06service: stop exposing TrpServiceRouteGuillaume Desmottes10-97/+87
TrpServiceRoute is an implementation detail of TrpServiceNavigation, users shouldn't have to care and only use TrpRoute. Renaming it to _TrpServiceRoute to make it clear it's an internal object and to prevent its get_type() function to be exported in the ABI. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4172
2016-09-06common: factor out _trp_route_to_variants()Guillaume Desmottes3-29/+49
Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4171
2016-09-06common: add TrpRoute as public APIGuillaume Desmottes11-205/+383
Factor out most of TrpServiceRoute to TrpRoute in common. This API will be used to implement the mock service API as well. Only the bare minium is public to API users so far. TrpRoute cannot check if the service is already published or not in functions modifying the route (as TrpServiceRoute was doing) so I'm introducing a new "writable" setting. It's TRUE by default and until the service has been published then it become immutable. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Mathieu Duponchelle <mathieu.duponchelle@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4170
2016-09-05libtraprain-client.pc.in: fix Requires(.private)Guillaume Desmottes1-2/+2
It was using the generic macros instead of the client specific ones. Signed-off-by: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk> Differential Revision: https://phabricator.apertis.org/D4150