Mir

Merge lp:~alan-griffiths/mir/first-cut-at-lp1415321 into lp:mir

Proposed by Alan Griffiths
Status: Work in progress
Proposed branch: lp:~alan-griffiths/mir/first-cut-at-lp1415321
Merge into: lp:mir
Diff against target: 284 lines (+65/-39)
12 files modified
src/client/CMakeLists.txt (+17/-2)
src/client/events/CMakeLists.txt (+2/-2)
src/client/input/CMakeLists.txt (+8/-12)
src/client/input/input_event.cpp (+1/-1)
src/client/symbols.map (+27/-0)
src/common/CMakeLists.txt (+0/-10)
src/common/sharedlibrary/CMakeLists.txt (+4/-1)
src/include/common/mir/logging/input_timestamp.h (+1/-5)
src/server/CMakeLists.txt (+2/-1)
src/server/graphics/nested/CMakeLists.txt (+0/-4)
tests/unit-tests/CMakeLists.txt (+2/-0)
tests/unit-tests/client/input/test_android_input_receiver.cpp (+1/-1)
To merge this branch: bzr merge lp:~alan-griffiths/mir/first-cut-at-lp1415321
Reviewer Review Type Date Requested Status
Chris Halse Rogers Needs Fixing
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+252627@code.launchpad.net

Commit message

common, client: move client library code into libmirclient

Description of the change

common, client: move client library code into libmirclient

This is a first cut - there is probably more tidy-up required. But offered up so that other eyes can help spot the opportunities.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Chris Halse Rogers (raof) wrote :

Why is mir::Udev::* in mirclient now? That's used by the platform code, and not by the client at all AFAIK.

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> Why is mir::Udev::* in mirclient now? That's used by the platform code, and
> not by the client at all AFAIK.

Because it was hidden in common/input.

Good catch. Thanks

Unmerged revisions

2389. By Alan Griffiths

Fix linker issues

2388. By Alan Griffiths

Move a bunch of client library code out of libmircommon

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'include/client/mir'
=== renamed directory 'include/common/mir/input' => 'include/client/mir/input'
=== renamed file 'include/common/mir_toolkit/client_types.h' => 'include/client/mir_toolkit/client_types.h'
=== renamed file 'include/common/mir_toolkit/event.h' => 'include/client/mir_toolkit/event.h'
=== renamed directory 'include/common/mir_toolkit/events' => 'include/client/mir_toolkit/events'
=== modified file 'src/client/CMakeLists.txt'
--- src/client/CMakeLists.txt 2015-03-10 03:17:27 +0000
+++ src/client/CMakeLists.txt 2015-03-11 18:04:02 +0000
@@ -30,14 +30,24 @@
30add_definitions(-DCLIENT_PLATFORM_VERSION="${MIR_CLIENT_PLATFORM_VERSION}")30add_definitions(-DCLIENT_PLATFORM_VERSION="${MIR_CLIENT_PLATFORM_VERSION}")
31add_definitions(-DMIR_LOGGING_COMPONENT_FALLBACK="mirclient")31add_definitions(-DMIR_LOGGING_COMPONENT_FALLBACK="mirclient")
3232
33set(MIR_CLIENT_SOURCES)
34set(MIR_CLIENT_REFERENCES)
35
33add_subdirectory(rpc/)36add_subdirectory(rpc/)
34add_subdirectory(lttng/)37add_subdirectory(lttng/)
38add_subdirectory(events)
39add_subdirectory(input)
40
41MESSAGE( STATUS "MIR_CLIENT_SOURCES. . . : ${MIR_CLIENT_SOURCES}" )
42MESSAGE( STATUS "MIR_CLIENT_REFERENCES . : ${MIR_CLIENT_REFERENCES}" )
43
3544
36add_library(mirclientobjects OBJECT45add_library(mirclientobjects OBJECT
3746
38 client_buffer_depository.cpp47 client_buffer_depository.cpp
39 display_configuration.cpp48 display_configuration.cpp
40 error_connections.cpp49 error_connections.cpp
50 event.cpp
41 mir_connection.cpp51 mir_connection.cpp
42 mir_connection_api.cpp52 mir_connection_api.cpp
43 mir_wait_handle.cpp53 mir_wait_handle.cpp
@@ -63,14 +73,19 @@
63 buffer_stream.cpp73 buffer_stream.cpp
64 mir_buffer_stream_api.cpp74 mir_buffer_stream_api.cpp
65 default_client_buffer_stream_factory.cpp75 default_client_buffer_stream_factory.cpp
76 ${MIR_CLIENT_SOURCES}
66)77)
6778
68# Ensure protobuf C++ headers have been produced before79# Ensure protobuf C++ headers have been produced before
69# trying to compile mirclientobjects80# trying to compile mirclientobjects
70add_dependencies(mirclientobjects mirprotobuf)81add_dependencies(mirclientobjects mirprotobuf)
7182
72add_library(mirclient SHARED $<TARGET_OBJECTS:mirclientobjects>)83add_library(mirclient SHARED $<TARGET_OBJECTS:mirclientobjects> $<TARGET_OBJECTS:mirsharedinput>)
73add_library(mirclient-static STATIC $<TARGET_OBJECTS:mirclientobjects>)84add_library(mirclient-static STATIC $<TARGET_OBJECTS:mirclientobjects> $<TARGET_OBJECTS:mirsharedinput>)
85
86target_link_libraries(mirclient
87 ${MIR_CLIENT_REFERENCES}
88)
7489
75set_target_properties(mirclient90set_target_properties(mirclient
7691
7792
=== renamed file 'src/common/event.cpp' => 'src/client/event.cpp'
=== renamed directory 'src/common/events' => 'src/client/events'
=== modified file 'src/client/events/CMakeLists.txt'
--- src/common/events/CMakeLists.txt 2015-01-22 22:56:47 +0000
+++ src/client/events/CMakeLists.txt 2015-03-11 18:04:02 +0000
@@ -14,8 +14,8 @@
14#14#
15# Authored by: Robert Carr <robert.carr@canonical.com>15# Authored by: Robert Carr <robert.carr@canonical.com>
1616
17list(APPEND MIR_COMMON_SOURCES17list(APPEND MIR_CLIENT_SOURCES
18 ${CMAKE_CURRENT_SOURCE_DIR}/event_builders.cpp18 ${CMAKE_CURRENT_SOURCE_DIR}/event_builders.cpp
19)19)
2020
21set(MIR_COMMON_SOURCES ${MIR_COMMON_SOURCES} PARENT_SCOPE)21set(MIR_CLIENT_SOURCES ${MIR_CLIENT_SOURCES} PARENT_SCOPE)
2222
=== renamed directory 'src/common/input' => 'src/client/input'
=== modified file 'src/client/input/CMakeLists.txt'
--- src/common/input/CMakeLists.txt 2015-03-05 05:47:28 +0000
+++ src/client/input/CMakeLists.txt 2015-03-11 18:04:02 +0000
@@ -30,17 +30,13 @@
30 ${CMAKE_CURRENT_SOURCE_DIR}/xkb_mapper.cpp30 ${CMAKE_CURRENT_SOURCE_DIR}/xkb_mapper.cpp
31)31)
3232
33list(APPEND MIR_COMMON_SOURCES33# As we put android-input in MIR_CLIENT_REFERENCES it ends up linked into
34 $<TARGET_OBJECTS:mirsharedinput>
35)
36
37# As we put android-input in MIR_COMMON_REFERENCES it ends up linked into
38# libmirserver. But linking into libmircommon fails as it in turn needs34# libmirserver. But linking into libmircommon fails as it in turn needs
39# mir::mir::terminate_with_current_exception() from mirserver35# mir::mir::terminate_with_current_exception() from mirserver
40list(APPEND MIR_COMMON_REFERENCES android-input)36list(APPEND MIR_CLIENT_REFERENCES android-input)
4137
42list(APPEND MIR_COMMON_REFERENCES ${XKBCOMMON_LIBRARIES})38list(APPEND MIR_CLIENT_REFERENCES ${XKBCOMMON_LIBRARIES})
43list(APPEND MIR_COMMON_REFERENCES ${UDEV_LDFLAGS} ${UDEV_LIBRARIES})39list(APPEND MIR_CLIENT_REFERENCES ${UDEV_LDFLAGS} ${UDEV_LIBRARIES})
4440
45set(MIR_COMMON_SOURCES ${MIR_COMMON_SOURCES} PARENT_SCOPE)41set(MIR_CLIENT_SOURCES ${MIR_CLIENT_SOURCES} PARENT_SCOPE)
46set(MIR_COMMON_REFERENCES ${MIR_COMMON_REFERENCES} PARENT_SCOPE)42set(MIR_CLIENT_REFERENCES ${MIR_CLIENT_REFERENCES} PARENT_SCOPE)
4743
=== modified file 'src/client/input/input_event.cpp'
--- src/common/input/input_event.cpp 2015-02-18 05:27:28 +0000
+++ src/client/input/input_event.cpp 2015-03-11 18:04:02 +0000
@@ -18,7 +18,7 @@
1818
19#define MIR_INCLUDE_DEPRECATED_EVENT_HEADER19#define MIR_INCLUDE_DEPRECATED_EVENT_HEADER
2020
21#define MIR_LOGGING_COMPONENT "input-event-access"21#define MIR_LOG_COMPONENT "input-event-access"
2222
23#include "mir/event_type_to_string.h"23#include "mir/event_type_to_string.h"
24#include "mir/log.h"24#include "mir/log.h"
2525
=== modified file 'src/client/symbols.map'
--- src/client/symbols.map 2015-02-18 05:27:28 +0000
+++ src/client/symbols.map 2015-03-11 18:04:02 +0000
@@ -44,3 +44,30 @@
44 mir_connection_create_spec_for_dialog;44 mir_connection_create_spec_for_dialog;
45 mir_connection_platform_operation;45 mir_connection_platform_operation;
46} MIR_CLIENT_8.2;46} MIR_CLIENT_8.2;
47
48MIR_CLIENT_8.4{
49 global:
50 extern "C++" {
51 mir::events::make_event*;
52 mir::input::android::Lexicon::translate*;
53 mir::udev::Context::?Context*;
54 mir::udev::Context::Context*;
55 mir::udev::Enumerator::begin*;
56 mir::udev::Enumerator::end*;
57 mir::udev::Enumerator::?Enumerator*;
58 mir::udev::Enumerator::Enumerator*;
59 mir::udev::Enumerator::iterator::operator*;
60 mir::udev::Enumerator::match_parent*;
61 mir::udev::Enumerator::match_subsystem*;
62 mir::udev::Enumerator::match_sysname*;
63 mir::udev::Enumerator::scan_devices*;
64 mir::udev::Monitor::enable*;
65 mir::udev::Monitor::fd*;
66 mir::udev::Monitor::filter_by_subsystem*;
67 mir::udev::Monitor::?Monitor*;
68 mir::udev::Monitor::Monitor*;
69 mir::udev::Monitor::process_events*;
70 mir::udev::operator*;
71 };
72} MIR_CLIENT_8.3;
73
4774
=== modified file 'src/common/CMakeLists.txt'
--- src/common/CMakeLists.txt 2015-02-18 05:27:28 +0000
+++ src/common/CMakeLists.txt 2015-03-11 18:04:02 +0000
@@ -10,7 +10,6 @@
1010
11add_subdirectory(fd)11add_subdirectory(fd)
12add_subdirectory(geometry)12add_subdirectory(geometry)
13add_subdirectory(input)
14add_subdirectory(logging)13add_subdirectory(logging)
15add_subdirectory(report/lttng)14add_subdirectory(report/lttng)
16add_subdirectory(env)15add_subdirectory(env)
@@ -23,7 +22,6 @@
23 $<TARGET_OBJECTS:mirtime>22 $<TARGET_OBJECTS:mirtime>
24 ${CMAKE_CURRENT_SOURCE_DIR}/log.cpp23 ${CMAKE_CURRENT_SOURCE_DIR}/log.cpp
25 )24 )
26add_subdirectory(events)
2725
28set(PREFIX "${CMAKE_INSTALL_PREFIX}")26set(PREFIX "${CMAKE_INSTALL_PREFIX}")
29set(EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}")27set(EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}")
@@ -35,14 +33,6 @@
35 ${MIR_GENERATED_INCLUDE_DIRECTORIES}33 ${MIR_GENERATED_INCLUDE_DIRECTORIES}
36 PARENT_SCOPE)34 PARENT_SCOPE)
3735
38
39MESSAGE( STATUS "MIR_COMMON_SOURCES. . . : ${MIR_COMMON_SOURCES}" )
40MESSAGE( STATUS "MIR_COMMON_REFERENCES . : ${MIR_COMMON_REFERENCES}" )
41
42list(APPEND MIR_COMMON_SOURCES
43 ${CMAKE_CURRENT_SOURCE_DIR}/event.cpp
44)
45
46add_library(mircommon36add_library(mircommon
47 SHARED37 SHARED
48 ${MIR_COMMON_SOURCES}38 ${MIR_COMMON_SOURCES}
4939
=== modified file 'src/common/sharedlibrary/CMakeLists.txt'
--- src/common/sharedlibrary/CMakeLists.txt 2015-03-05 05:47:28 +0000
+++ src/common/sharedlibrary/CMakeLists.txt 2015-03-11 18:04:02 +0000
@@ -24,7 +24,10 @@
24 $<TARGET_OBJECTS:mirsharedsharedlibrary>24 $<TARGET_OBJECTS:mirsharedsharedlibrary>
25)25)
2626
27list(APPEND MIR_COMMON_REFERENCES dl)27list(APPEND MIR_COMMON_REFERENCES
28 dl
29 ${Boost_LIBRARIES}
30)
2831
29set(MIR_COMMON_SOURCES ${MIR_COMMON_SOURCES} PARENT_SCOPE)32set(MIR_COMMON_SOURCES ${MIR_COMMON_SOURCES} PARENT_SCOPE)
30set(MIR_COMMON_REFERENCES ${MIR_COMMON_REFERENCES} PARENT_SCOPE)33set(MIR_COMMON_REFERENCES ${MIR_COMMON_REFERENCES} PARENT_SCOPE)
3134
=== modified file 'src/include/common/mir/logging/input_timestamp.h'
--- src/include/common/mir/logging/input_timestamp.h 2015-02-18 05:27:28 +0000
+++ src/include/common/mir/logging/input_timestamp.h 2015-03-11 18:04:02 +0000
@@ -1,5 +1,5 @@
1/*1/*
2 * Copyright © 2013 Canonical Ltd.2 * Copyright © 2013-2015 Canonical Ltd.
3 *3 *
4 * This program is free software: you can redistribute it and/or modify it4 * This program is free software: you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License version 3,5 * under the terms of the GNU Lesser General Public License version 3,
@@ -19,10 +19,6 @@
19#ifndef MIR_LOGGING_INPUT_TIMESTAMP_H_19#ifndef MIR_LOGGING_INPUT_TIMESTAMP_H_
20#define MIR_LOGGING_INPUT_TIMESTAMP_H_20#define MIR_LOGGING_INPUT_TIMESTAMP_H_
2121
22#define MIR_INCLUDE_DEPRECATED_EVENT_HEADER
23
24#include "mir_toolkit/event.h"
25
26#include <string>22#include <string>
27#include <chrono>23#include <chrono>
2824
2925
=== modified file 'src/server/CMakeLists.txt'
--- src/server/CMakeLists.txt 2015-03-05 05:47:28 +0000
+++ src/server/CMakeLists.txt 2015-03-11 18:04:02 +0000
@@ -5,8 +5,9 @@
55
6include_directories(6include_directories(
7 ${PROJECT_SOURCE_DIR}/include/platform7 ${PROJECT_SOURCE_DIR}/include/platform
8 ${PROJECT_SOURCE_DIR}/include/client
9 ${PROJECT_SOURCE_DIR}/include/server
8 ${PROJECT_SOURCE_DIR}/src/include/platform10 ${PROJECT_SOURCE_DIR}/src/include/platform
9 ${PROJECT_SOURCE_DIR}/include/server
10 ${PROJECT_SOURCE_DIR}/src/include/server11 ${PROJECT_SOURCE_DIR}/src/include/server
11 ${GLIB_INCLUDE_DIRS}12 ${GLIB_INCLUDE_DIRS}
12)13)
1314
=== modified file 'src/server/graphics/nested/CMakeLists.txt'
--- src/server/graphics/nested/CMakeLists.txt 2015-01-21 07:34:50 +0000
+++ src/server/graphics/nested/CMakeLists.txt 2015-03-11 18:04:02 +0000
@@ -1,7 +1,3 @@
1include_directories(
2 ${PROJECT_SOURCE_DIR}/include/client
3)
4
5add_library(1add_library(
6 mirnestedgraphics OBJECT2 mirnestedgraphics OBJECT
73
84
=== modified file 'tests/unit-tests/CMakeLists.txt'
--- tests/unit-tests/CMakeLists.txt 2015-03-05 05:47:28 +0000
+++ tests/unit-tests/CMakeLists.txt 2015-03-11 18:04:02 +0000
@@ -83,6 +83,7 @@
83 ${UNIT_TEST_SOURCES}83 ${UNIT_TEST_SOURCES}
84 ${MIR_SERVER_OBJECTS}84 ${MIR_SERVER_OBJECTS}
85 $<TARGET_OBJECTS:mirclientobjects>85 $<TARGET_OBJECTS:mirclientobjects>
86 $<TARGET_OBJECTS:mirsharedinput>
86 ${MIR_PLATFORM_OBJECTS}87 ${MIR_PLATFORM_OBJECTS}
87 ${MIR_COMMON_OBJECTS}88 ${MIR_COMMON_OBJECTS}
88)89)
@@ -130,6 +131,7 @@
130 ${MIR_PLATFORM_REFERENCES}131 ${MIR_PLATFORM_REFERENCES}
131 ${MIR_COMMON_REFERENCES}132 ${MIR_COMMON_REFERENCES}
132 ${MIR_SERVER_REFERENCES}133 ${MIR_SERVER_REFERENCES}
134 ${XKBCOMMON_LIBRARIES}
133)135)
134136
135if (MIR_BUILD_PLATFORM_ANDROID)137if (MIR_BUILD_PLATFORM_ANDROID)
136138
=== modified file 'tests/unit-tests/client/input/test_android_input_receiver.cpp'
--- tests/unit-tests/client/input/test_android_input_receiver.cpp 2015-03-05 05:47:28 +0000
+++ tests/unit-tests/client/input/test_android_input_receiver.cpp 2015-03-11 18:04:02 +0000
@@ -18,7 +18,7 @@
1818
19#define MIR_INCLUDE_DEPRECATED_EVENT_HEADER19#define MIR_INCLUDE_DEPRECATED_EVENT_HEADER
2020
21#include "src/common/input/android/android_input_receiver.h"21#include "src/client/input/android/android_input_receiver.h"
22#include "mir/input/null_input_receiver_report.h"22#include "mir/input/null_input_receiver_report.h"
23#include "mir/input/xkb_mapper.h"23#include "mir/input/xkb_mapper.h"
24#include "mir_toolkit/event.h"24#include "mir_toolkit/event.h"

Subscribers

People subscribed via source and target branches