Merge lp:~vanvugt/mir/frontend-server into lp:mir
- frontend-server
- Merge into development-branch
Status: | Rejected |
---|---|
Rejected by: | Daniel van Vugt |
Proposed branch: | lp:~vanvugt/mir/frontend-server |
Merge into: | lp:mir |
Diff against target: |
666 lines (+75/-77) 20 files modified
examples/demo-inprocess-surface-client/demo_inprocess_surface_client.cpp (+1/-1) examples/demo-inprocess-surface-client/inprocess_egl_client.cpp (+5/-5) examples/demo-inprocess-surface-client/inprocess_egl_client.h (+3/-3) include/server/mir/default_server_configuration.h (+3/-3) include/server/mir/frontend/server.h (+8/-8) include/server/mir/server_configuration.h (+0/-1) include/test/mir_test_doubles/mock_server.h (+5/-5) include/test/mir_test_doubles/stub_server.h (+6/-6) src/server/frontend/default_configuration.cpp (+7/-7) src/server/frontend/session_mediator.cpp (+7/-7) src/server/frontend/session_mediator.h (+3/-3) src/server/scene/default_configuration.cpp (+2/-2) src/server/scene/session_manager.h (+2/-2) tests/acceptance-tests/test_protobuf.cpp (+1/-1) tests/integration-tests/session_management.cpp (+2/-2) tests/integration-tests/test_error_reporting.cpp (+1/-1) tests/mir_test_framework/input_testing_server_options.cpp (+0/-1) tests/unit-tests/frontend/test_session_mediator.cpp (+9/-9) tests/unit-tests/frontend/test_session_mediator_android.cpp (+5/-5) tests/unit-tests/frontend/test_session_mediator_mesa.cpp (+5/-5) |
To merge this branch: | bzr merge lp:~vanvugt/mir/frontend-server |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Robert Carr (community) | Disapprove | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Chris Halse Rogers | Abstain | ||
Andreas Pokorny (community) | Needs Fixing | ||
Kevin DuBois (community) | needs discussion | Needs Information | |
Alan Griffiths | Needs Fixing | ||
Alexandros Frantzis (community) | Needs Information | ||
Review via email: mp+207602@code.launchpad.net |
Commit message
Rename frontend::Shell --> frontend::Server
That class in no way resembles a shell, does not relate to the "shell"
component, and does not provide real shells with any shell-related interface.
This frees up the name "Shell" for more appropriate and less confusing
use in real shell code.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
Andreas Pokorny (andreas-pokorny) wrote : | # |
I am not sure about the new name - but it seems a better fit. Something with Session would be nice.. but SessionManager..... nah.
Alexandros Frantzis (afrantzis) wrote : | # |
I don't find the new name an improvement. What's a 'server' from the point of view of the frontend? Why is not the graphics platform or the focus controller also part of the 'server'?
"Needs discussion"
Alan Griffiths (alan-griffiths) wrote : | # |
I think this is a verschlimmbesserung (sorry, don't know an English equivalent)
I could understand changing "Shell" to "Scene", but to "Server"?
Daniel van Vugt (vanvugt) wrote : | # |
It looks like most of the team could agree that "frontend::Shell" needs renaming in the least. If you're unhappy with "Server" then suggest away.
Looking at the interface it provides, no obvious noun comes to mind. But I feel "Server" is less bad than "Shell" for the reasons already stated. Although if no obvious noun comes to mind, that also suggests the interface itself is a bad fit and might be better placed as part of some other class/interface.
kevin gunn (kgunn72) wrote : | # |
so maybe i'm just simpleminded...i read through the comment, then read thru the code a bit. "server" makes sense to me.
Kevin DuBois (kdub) wrote : | # |
mf::Shell (in lp:mir/devel) has open_session, close_session, create_surface_for, and handle_
I've had the thought before that create_
So, create_
Kevin DuBois (kdub) : | # |
Daniel van Vugt (vanvugt) wrote : | # |
I'd rather not call it a Factory. That pattern is presently reserved for construction-only interfaces. I don't see this as sufficient reason to break with that tradition.
Alan Griffiths (alan-griffiths) wrote : | # |
I think the problem is that frontend::Shell doesn't represent a clear abstraction. If it did, then we would probably have a good name for that abstraction.
Three of the four functions are actually to do with manipulating the data model. Vis: open_session(), close_session() and create_
That comes down to a poor interface design around scene, Session and Surface. It ought to be easy for a shell to decorate the data model required by frontend and add its own logic. The fact that we've made that hard for ourselves (and for unity8) is the underlying cause for the awkward handle_
Note that this interface is a part of a larger mess: We've got an awkward coupling between creating surfaces and them being added to the scene. (Creating the surface implicitly adds it to the scene *before* the client has had a chance to paint a buffer.)
The interface should probably be something like:
class frontend::XXXXX
{
public:
virtual std::shared_
virtual void activate(
virtual void deactivate(
};
class frontend::Session
{
public:
virtual std::shared_
virtual void activate(
virtual void deactivate(
...
};
We ought to provide utility classes for decorating implementations of these that can be used by shells to wrap the implementations provided by scene.
PS I still think that Scene is a better name than Server
Alan Griffiths (alan-griffiths) wrote : | # |
Odd how my thoughts change shortly after posting.
...
> The interface should probably be something like:
>
> class frontend::XXXXX
> {
> public:
> virtual std::shared_
> virtual void activate(
> virtual void deactivate(
> };
>
> class frontend::Session
> {
> public:
> virtual std::shared_
> virtual void activate(
> virtual void deactivate(
> ...
> };
Actually:
class frontend::Scene
{
public:
virtual std::shared_
virtual void add(std:
virtual void remove(
virtual void add(std:
virtual void remove(
};
class frontend::Session
{
public:
virtual std::shared_
...
};
Daniel van Vugt (vanvugt) wrote : | # |
Alan,
I think overlapping names like that between components makes things less clear. Class "frontend::Scene" isn't a member of component/namespace "scene". That's definitely confusing and just recreates the problem being solved here. There may be good reasons out there to do that sometimes but I don't see this as one.
Re: "Creating the surface implicitly adds it to the scene *before* the client has had a chance to paint a buffer". That's fine and desirable even. We have the smarts in place to never composite a surface which hasn't been painted. With a few minor bugs (in progress) that feature does work. More importantly we must remember to never trust any client(!). They are external processes beyond our control and we should ensure there is never any sever logic which blocks on, or depends on a client behaving correctly.
Alberto Aguirre (albaguirre) wrote : | # |
frontend::Shell does seem weird.
What about frontend::Service or frontend:
Daniel van Vugt (vanvugt) wrote : | # |
"Service" is a overly generic word, I think.
It sounds like we're all confused by the role of the class and that's what really needs to be resolved before a good name is obvious.
Chris Halse Rogers (raof) wrote : | # |
Yeah.
So, as I understand it it's currently a combination of Session factoryish and weird surface bits.
create_surface_for looks to be a bit of a hack we should get away from - this is an internal implementation detail that shells shouldn't have to worry about.
handle_
It's somewhat inconvenient that we already have a frontend:
- 1418. By Daniel van Vugt
-
Merge latest development-branch
- 1419. By Daniel van Vugt
-
Merge latest development-branch
- 1420. By Daniel van Vugt
-
Merge latest development-branch.
- 1421. By Daniel van Vugt
-
Merge latest development-branch
- 1422. By Daniel van Vugt
-
Merge latest development-branch
- 1423. By Daniel van Vugt
-
Merge latest development-branch
- 1424. By Daniel van Vugt
-
Merge latest development-branch.
- 1425. By Daniel van Vugt
-
Merge latest development-branch
- 1426. By Daniel van Vugt
-
Merge latest development-branch
- 1427. By Daniel van Vugt
-
Merge latest development-branch
- 1428. By Daniel van Vugt
-
Merge latest development-branch
- 1429. By Daniel van Vugt
-
Merge latest development-branch
- 1430. By Daniel van Vugt
-
Merge latest development-branch
- 1431. By Daniel van Vugt
-
Merge latest development-branch
- 1432. By Daniel van Vugt
-
Merge latest development-branch
- 1433. By Daniel van Vugt
-
Merge latest development-branch
- 1434. By Daniel van Vugt
-
Merge latest development-branch
- 1435. By Daniel van Vugt
-
Merge latest development-branch and resolve a conflict.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1435
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Andreas Pokorny (andreas-pokorny) wrote : | # |
Alans proposal is more convincing than just renaming.
But I am not yet sure about scene vs server vs something better:
object_
// is add now supposed to decide whether the sessions surface should be visible, maybe focused or stay invisible?
Then both Scene and Shell seem to be legitimate names
Daniel van Vugt (vanvugt) wrote : | # |
The common problem is the "frontend" component. While it exists, at least in that vague guise, it will continue to cause confusion around the purposes of the things within it.
As far as I understand "frontend" means the protocol server "end". And by that understanding there should probably be no "Shell" or "Scene" within that. Maybe my understanding is amiss somewhere?
Chris Halse Rogers (raof) wrote : | # |
Given that we're all agreed that this class needs to be refactored, I don't think there's much benefit in churning the name, but I don't strongly object either.
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1436
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1438
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Robert Carr (robertcarr) wrote : | # |
Andreas wrote:
>> Alans proposal is more convincing than just renaming.
>> But I am not yet sure about scene vs server vs something better:
>> object_
>> // is add now supposed to decide whether the sessions surface should be visible, maybe focused or stay >> invisible?
>> Then both Scene and Shell seem to be legitimate names
I agree. Going on, it's possible to think of the Shell as interpreting requests from the frontend to the Scene...which isnt a total lie with the current object. Sure, the implementation object is not convincingly a shell...but that's not so important, it's the interface which exposes the shell services to the frontend. I'm not so upset with Shell.
I think scene is a little overly general in this case.
Given some refactoring in SessionMediator and SessionManager we could imagine this interface as a sort of "mf::ProtocolIn
Daniel wrote:
>> The common problem is the "frontend" component. While it exists, at least in that vague guise, it will
>> continue to cause confusion around the purposes of the things within it.
>> As far as I understand "frontend" means the protocol server "end". And by that understanding there should >> probably be no "Shell" or "Scene" within that. Maybe my understanding is amiss somewhere?
Sure there should be no Shell or Scene implementation there, but it may need an interface by which to interact with the Shell or Scene. We declare interfaces in the namespace they are used to improve radial encapsulation.
Chris Wrote:
>> Given that we're all agreed that this class needs to be refactored, I don't think there's much benefit in >> churning the name, but I don't strongly object either.
+1!
Robert Carr (robertcarr) : | # |
- 1436. By Daniel van Vugt
-
Merge latest development-branch
- 1437. By Daniel van Vugt
-
Merge latest development-branch
- 1438. By Daniel van Vugt
-
Merge latest development-branch
- 1439. By Daniel van Vugt
-
Merge latest development-branch
- 1440. By Daniel van Vugt
-
Merge latest development-branch
- 1441. By Daniel van Vugt
-
Merge latest development-branch
- 1442. By Daniel van Vugt
-
Merge latest development-branch
- 1443. By Daniel van Vugt
-
Merge latest development-branch and fix conflicts
- 1444. By Daniel van Vugt
-
Fix more (soft) conflicts from recent changes
Daniel van Vugt (vanvugt) wrote : | # |
There were actually several revisions last week too, but the history from my home machine clobbered them. Still, same end result...
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:1444
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Robert Carr (robertcarr) wrote : | # |
The new name isnt growing on me, dont think we need to churn it right now.
Daniel van Vugt (vanvugt) wrote : | # |
I give up. Clearly the current architecture does not lend itself to being able to easily choose accurate class names. We need to work on both problems at once.
Unmerged revisions
- 1444. By Daniel van Vugt
-
Fix more (soft) conflicts from recent changes
- 1443. By Daniel van Vugt
-
Merge latest development-branch and fix conflicts
- 1442. By Daniel van Vugt
-
Merge latest development-branch
- 1441. By Daniel van Vugt
-
Merge latest development-branch
- 1440. By Daniel van Vugt
-
Merge latest development-branch
- 1439. By Daniel van Vugt
-
Merge latest development-branch
- 1438. By Daniel van Vugt
-
Merge latest development-branch
- 1437. By Daniel van Vugt
-
Merge latest development-branch
- 1436. By Daniel van Vugt
-
Merge latest development-branch
- 1435. By Daniel van Vugt
-
Merge latest development-branch and resolve a conflict.
Preview Diff
1 | === modified file 'examples/demo-inprocess-surface-client/demo_inprocess_surface_client.cpp' | |||
2 | --- examples/demo-inprocess-surface-client/demo_inprocess_surface_client.cpp 2014-03-06 06:05:17 +0000 | |||
3 | +++ examples/demo-inprocess-surface-client/demo_inprocess_surface_client.cpp 2014-04-15 04:08:26 +0000 | |||
4 | @@ -49,7 +49,7 @@ | |||
5 | 49 | { | 49 | { |
6 | 50 | client = std::make_shared<me::InprocessEGLClient>( | 50 | client = std::make_shared<me::InprocessEGLClient>( |
7 | 51 | config.the_graphics_platform(), | 51 | config.the_graphics_platform(), |
9 | 52 | config.the_frontend_shell(), | 52 | config.the_frontend_server(), |
10 | 53 | config.the_focus_controller()); | 53 | config.the_focus_controller()); |
11 | 54 | }); | 54 | }); |
12 | 55 | ///\internal [main_tag] | 55 | ///\internal [main_tag] |
13 | 56 | 56 | ||
14 | === modified file 'examples/demo-inprocess-surface-client/inprocess_egl_client.cpp' | |||
15 | --- examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2014-04-08 09:06:37 +0000 | |||
16 | +++ examples/demo-inprocess-surface-client/inprocess_egl_client.cpp 2014-04-15 04:08:26 +0000 | |||
17 | @@ -25,7 +25,7 @@ | |||
18 | 25 | #include "mir/scene/surface_creation_parameters.h" | 25 | #include "mir/scene/surface_creation_parameters.h" |
19 | 26 | #include "mir/scene/session.h" | 26 | #include "mir/scene/session.h" |
20 | 27 | #include "mir/frontend/session.h" | 27 | #include "mir/frontend/session.h" |
22 | 28 | #include "mir/frontend/shell.h" | 28 | #include "mir/frontend/server.h" |
23 | 29 | #include "mir/geometry/size.h" | 29 | #include "mir/geometry/size.h" |
24 | 30 | #include "mir/graphics/buffer_properties.h" | 30 | #include "mir/graphics/buffer_properties.h" |
25 | 31 | #include "mir/graphics/platform.h" | 31 | #include "mir/graphics/platform.h" |
26 | @@ -58,10 +58,10 @@ | |||
27 | 58 | 58 | ||
28 | 59 | me::InprocessEGLClient::InprocessEGLClient( | 59 | me::InprocessEGLClient::InprocessEGLClient( |
29 | 60 | std::shared_ptr<mg::Platform> const& graphics_platform, | 60 | std::shared_ptr<mg::Platform> const& graphics_platform, |
31 | 61 | std::shared_ptr<frontend::Shell> const& shell, | 61 | std::shared_ptr<frontend::Server> const& server, |
32 | 62 | std::shared_ptr<shell::FocusController> const& focus_controller) | 62 | std::shared_ptr<shell::FocusController> const& focus_controller) |
33 | 63 | : graphics_platform(graphics_platform), | 63 | : graphics_platform(graphics_platform), |
35 | 64 | shell(shell), | 64 | server(server), |
36 | 65 | focus_controller(focus_controller), | 65 | focus_controller(focus_controller), |
37 | 66 | client_thread(std::mem_fn(&InprocessEGLClient::thread_loop), this), | 66 | client_thread(std::mem_fn(&InprocessEGLClient::thread_loop), this), |
38 | 67 | terminate(false) | 67 | terminate(false) |
39 | @@ -96,9 +96,9 @@ | |||
40 | 96 | .of_size(surface_size) | 96 | .of_size(surface_size) |
41 | 97 | .of_buffer_usage(mg::BufferUsage::hardware) | 97 | .of_buffer_usage(mg::BufferUsage::hardware) |
42 | 98 | .of_pixel_format(mir_pixel_format_argb_8888); | 98 | .of_pixel_format(mir_pixel_format_argb_8888); |
44 | 99 | auto session = shell->open_session(getpid(), "Inprocess client", std::make_shared<NullEventSink>()); | 99 | auto session = server->open_session(getpid(), "Inprocess client", std::make_shared<NullEventSink>()); |
45 | 100 | // TODO: Why do we get an ID? ~racarr | 100 | // TODO: Why do we get an ID? ~racarr |
47 | 101 | auto surface = session->get_surface(shell->create_surface_for(session, params)); | 101 | auto surface = session->get_surface(server->create_surface_for(session, params)); |
48 | 102 | 102 | ||
49 | 103 | auto input_platform = mircv::InputPlatform::create(); | 103 | auto input_platform = mircv::InputPlatform::create(); |
50 | 104 | input_thread = input_platform->create_input_thread( | 104 | input_thread = input_platform->create_input_thread( |
51 | 105 | 105 | ||
52 | === modified file 'examples/demo-inprocess-surface-client/inprocess_egl_client.h' | |||
53 | --- examples/demo-inprocess-surface-client/inprocess_egl_client.h 2014-03-06 06:05:17 +0000 | |||
54 | +++ examples/demo-inprocess-surface-client/inprocess_egl_client.h 2014-04-15 04:08:26 +0000 | |||
55 | @@ -37,7 +37,7 @@ | |||
56 | 37 | } | 37 | } |
57 | 38 | namespace graphics { class Platform; } | 38 | namespace graphics { class Platform; } |
58 | 39 | namespace shell { class FocusController; } | 39 | namespace shell { class FocusController; } |
60 | 40 | namespace frontend { class Shell; } | 40 | namespace frontend { class Server; } |
61 | 41 | 41 | ||
62 | 42 | namespace examples | 42 | namespace examples |
63 | 43 | { | 43 | { |
64 | @@ -48,7 +48,7 @@ | |||
65 | 48 | public: | 48 | public: |
66 | 49 | InprocessEGLClient( | 49 | InprocessEGLClient( |
67 | 50 | std::shared_ptr<graphics::Platform> const& graphics_platform, | 50 | std::shared_ptr<graphics::Platform> const& graphics_platform, |
69 | 51 | std::shared_ptr<frontend::Shell> const& shell, | 51 | std::shared_ptr<frontend::Server> const& server, |
70 | 52 | std::shared_ptr<shell::FocusController> const& focus_controller); | 52 | std::shared_ptr<shell::FocusController> const& focus_controller); |
71 | 53 | 53 | ||
72 | 54 | ~InprocessEGLClient(); | 54 | ~InprocessEGLClient(); |
73 | @@ -59,7 +59,7 @@ | |||
74 | 59 | 59 | ||
75 | 60 | private: | 60 | private: |
76 | 61 | std::shared_ptr<graphics::Platform> const graphics_platform; | 61 | std::shared_ptr<graphics::Platform> const graphics_platform; |
78 | 62 | std::shared_ptr<frontend::Shell> const shell; | 62 | std::shared_ptr<frontend::Server> const server; |
79 | 63 | std::shared_ptr<shell::FocusController> const focus_controller; | 63 | std::shared_ptr<shell::FocusController> const focus_controller; |
80 | 64 | 64 | ||
81 | 65 | std::thread client_thread; | 65 | std::thread client_thread; |
82 | 66 | 66 | ||
83 | === modified file 'include/server/mir/default_server_configuration.h' | |||
84 | --- include/server/mir/default_server_configuration.h 2014-04-14 11:31:04 +0000 | |||
85 | +++ include/server/mir/default_server_configuration.h 2014-04-15 04:08:26 +0000 | |||
86 | @@ -39,7 +39,7 @@ | |||
87 | 39 | } | 39 | } |
88 | 40 | namespace frontend | 40 | namespace frontend |
89 | 41 | { | 41 | { |
91 | 42 | class Shell; | 42 | class Server; |
92 | 43 | class Connector; | 43 | class Connector; |
93 | 44 | class ConnectorReport; | 44 | class ConnectorReport; |
94 | 45 | class ProtobufIpcFactory; | 45 | class ProtobufIpcFactory; |
95 | @@ -180,7 +180,7 @@ | |||
96 | 180 | virtual std::shared_ptr<frontend::SessionMediatorReport> the_session_mediator_report(); | 180 | virtual std::shared_ptr<frontend::SessionMediatorReport> the_session_mediator_report(); |
97 | 181 | virtual std::shared_ptr<frontend::MessageProcessorReport> the_message_processor_report(); | 181 | virtual std::shared_ptr<frontend::MessageProcessorReport> the_message_processor_report(); |
98 | 182 | virtual std::shared_ptr<frontend::SessionAuthorizer> the_session_authorizer(); | 182 | virtual std::shared_ptr<frontend::SessionAuthorizer> the_session_authorizer(); |
100 | 183 | virtual std::shared_ptr<frontend::Shell> the_frontend_shell(); | 183 | virtual std::shared_ptr<frontend::Server> the_frontend_server(); |
101 | 184 | virtual std::shared_ptr<frontend::EventSink> the_global_event_sink(); | 184 | virtual std::shared_ptr<frontend::EventSink> the_global_event_sink(); |
102 | 185 | virtual std::shared_ptr<frontend::DisplayChanger> the_frontend_display_changer(); | 185 | virtual std::shared_ptr<frontend::DisplayChanger> the_frontend_display_changer(); |
103 | 186 | virtual std::shared_ptr<frontend::Screencast> the_screencast(); | 186 | virtual std::shared_ptr<frontend::Screencast> the_screencast(); |
104 | @@ -250,7 +250,7 @@ | |||
105 | 250 | virtual std::shared_ptr<input::InputChannelFactory> the_input_channel_factory(); | 250 | virtual std::shared_ptr<input::InputChannelFactory> the_input_channel_factory(); |
106 | 251 | virtual std::shared_ptr<scene::MediatingDisplayChanger> the_mediating_display_changer(); | 251 | virtual std::shared_ptr<scene::MediatingDisplayChanger> the_mediating_display_changer(); |
107 | 252 | virtual std::shared_ptr<frontend::ProtobufIpcFactory> the_ipc_factory( | 252 | virtual std::shared_ptr<frontend::ProtobufIpcFactory> the_ipc_factory( |
109 | 253 | std::shared_ptr<frontend::Shell> const& shell, | 253 | std::shared_ptr<frontend::Server> const& server, |
110 | 254 | std::shared_ptr<graphics::GraphicBufferAllocator> const& allocator); | 254 | std::shared_ptr<graphics::GraphicBufferAllocator> const& allocator); |
111 | 255 | 255 | ||
112 | 256 | CachedPtr<frontend::Connector> connector; | 256 | CachedPtr<frontend::Connector> connector; |
113 | 257 | 257 | ||
114 | === renamed file 'include/server/mir/frontend/shell.h' => 'include/server/mir/frontend/server.h' | |||
115 | --- include/server/mir/frontend/shell.h 2014-04-08 09:06:37 +0000 | |||
116 | +++ include/server/mir/frontend/server.h 2014-04-15 04:08:26 +0000 | |||
117 | @@ -16,8 +16,8 @@ | |||
118 | 16 | * Authored by: Thomas Voss <thomas.voss@canonical.com> | 16 | * Authored by: Thomas Voss <thomas.voss@canonical.com> |
119 | 17 | */ | 17 | */ |
120 | 18 | 18 | ||
123 | 19 | #ifndef MIR_FRONTEND_SHELL_H_ | 19 | #ifndef MIR_FRONTEND_SERVER_H_ |
124 | 20 | #define MIR_FRONTEND_SHELL_H_ | 20 | #define MIR_FRONTEND_SERVER_H_ |
125 | 21 | 21 | ||
126 | 22 | #include "mir/frontend/surface_id.h" | 22 | #include "mir/frontend/surface_id.h" |
127 | 23 | 23 | ||
128 | @@ -36,10 +36,10 @@ | |||
129 | 36 | class EventSink; | 36 | class EventSink; |
130 | 37 | class Session; | 37 | class Session; |
131 | 38 | 38 | ||
133 | 39 | class Shell | 39 | class Server |
134 | 40 | { | 40 | { |
135 | 41 | public: | 41 | public: |
137 | 42 | virtual ~Shell() = default; | 42 | virtual ~Server() = default; |
138 | 43 | 43 | ||
139 | 44 | virtual std::shared_ptr<Session> open_session( | 44 | virtual std::shared_ptr<Session> open_session( |
140 | 45 | pid_t client_pid, | 45 | pid_t client_pid, |
141 | @@ -55,12 +55,12 @@ | |||
142 | 55 | virtual void handle_surface_created(std::shared_ptr<Session> const& session) = 0; | 55 | virtual void handle_surface_created(std::shared_ptr<Session> const& session) = 0; |
143 | 56 | 56 | ||
144 | 57 | protected: | 57 | protected: |
148 | 58 | Shell() = default; | 58 | Server() = default; |
149 | 59 | Shell(const Shell&) = delete; | 59 | Server(const Server&) = delete; |
150 | 60 | Shell& operator=(const Shell&) = delete; | 60 | Server& operator=(const Server&) = delete; |
151 | 61 | }; | 61 | }; |
152 | 62 | 62 | ||
153 | 63 | } | 63 | } |
154 | 64 | } | 64 | } |
155 | 65 | 65 | ||
157 | 66 | #endif // MIR_FRONTEND_SHELL_H_ | 66 | #endif // MIR_FRONTEND_SERVER_H_ |
158 | 67 | 67 | ||
159 | === modified file 'include/server/mir/server_configuration.h' | |||
160 | --- include/server/mir/server_configuration.h 2013-10-16 07:34:22 +0000 | |||
161 | +++ include/server/mir/server_configuration.h 2014-04-15 04:08:26 +0000 | |||
162 | @@ -29,7 +29,6 @@ | |||
163 | 29 | namespace frontend | 29 | namespace frontend |
164 | 30 | { | 30 | { |
165 | 31 | class Connector; | 31 | class Connector; |
166 | 32 | class Shell; | ||
167 | 33 | } | 32 | } |
168 | 34 | namespace shell | 33 | namespace shell |
169 | 35 | { | 34 | { |
170 | 36 | 35 | ||
171 | === renamed file 'include/test/mir_test_doubles/mock_shell.h' => 'include/test/mir_test_doubles/mock_server.h' | |||
172 | --- include/test/mir_test_doubles/mock_shell.h 2014-04-08 09:06:37 +0000 | |||
173 | +++ include/test/mir_test_doubles/mock_server.h 2014-04-15 04:08:26 +0000 | |||
174 | @@ -16,11 +16,11 @@ | |||
175 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> |
176 | 17 | */ | 17 | */ |
177 | 18 | 18 | ||
180 | 19 | #ifndef MIR_TEST_DOUBLES_SHELL_H_ | 19 | #ifndef MIR_TEST_DOUBLES_MOCK_SERVER_H_ |
181 | 20 | #define MIR_TEST_DOUBLES_SHELL_H_ | 20 | #define MIR_TEST_DOUBLES_MOCK_SERVER_H_ |
182 | 21 | 21 | ||
183 | 22 | #include "mir/scene/surface_creation_parameters.h" | 22 | #include "mir/scene/surface_creation_parameters.h" |
185 | 23 | #include "mir/frontend/shell.h" | 23 | #include "mir/frontend/server.h" |
186 | 24 | #include "mir/frontend/surface_id.h" | 24 | #include "mir/frontend/surface_id.h" |
187 | 25 | 25 | ||
188 | 26 | #include <gmock/gmock.h> | 26 | #include <gmock/gmock.h> |
189 | @@ -32,7 +32,7 @@ | |||
190 | 32 | namespace doubles | 32 | namespace doubles |
191 | 33 | { | 33 | { |
192 | 34 | 34 | ||
194 | 35 | struct MockShell : public frontend::Shell | 35 | struct MockServer : public frontend::Server |
195 | 36 | { | 36 | { |
196 | 37 | MOCK_METHOD3(open_session, std::shared_ptr<frontend::Session>( | 37 | MOCK_METHOD3(open_session, std::shared_ptr<frontend::Session>( |
197 | 38 | pid_t client_pid, | 38 | pid_t client_pid, |
198 | @@ -49,4 +49,4 @@ | |||
199 | 49 | } | 49 | } |
200 | 50 | } // namespace mir | 50 | } // namespace mir |
201 | 51 | 51 | ||
203 | 52 | #endif // MIR_TEST_DOUBLES_SHELL_H_ | 52 | #endif // MIR_TEST_DOUBLES_MOCK_SERVER_H_ |
204 | 53 | 53 | ||
205 | === renamed file 'include/test/mir_test_doubles/stub_shell.h' => 'include/test/mir_test_doubles/stub_server.h' | |||
206 | --- include/test/mir_test_doubles/stub_shell.h 2014-04-08 09:06:37 +0000 | |||
207 | +++ include/test/mir_test_doubles/stub_server.h 2014-04-15 04:08:26 +0000 | |||
208 | @@ -16,10 +16,10 @@ | |||
209 | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> | 16 | * Authored by: Robert Carr <robert.carr@canonical.com> |
210 | 17 | */ | 17 | */ |
211 | 18 | 18 | ||
214 | 19 | #ifndef MIR_TEST_DOUBLES_STUB_SHELL_H_ | 19 | #ifndef MIR_TEST_DOUBLES_STUB_SERVER_H_ |
215 | 20 | #define MIR_TEST_DOUBLES_STUB_SHELL_H_ | 20 | #define MIR_TEST_DOUBLES_STUB_SERVER_H_ |
216 | 21 | 21 | ||
218 | 22 | #include "mir/frontend/shell.h" | 22 | #include "mir/frontend/server.h" |
219 | 23 | #include "mir_test_doubles/stub_session.h" | 23 | #include "mir_test_doubles/stub_session.h" |
220 | 24 | 24 | ||
221 | 25 | namespace mir | 25 | namespace mir |
222 | @@ -29,9 +29,9 @@ | |||
223 | 29 | namespace doubles | 29 | namespace doubles |
224 | 30 | { | 30 | { |
225 | 31 | 31 | ||
227 | 32 | struct StubShell : public frontend::Shell | 32 | struct StubServer : public frontend::Server |
228 | 33 | { | 33 | { |
230 | 34 | StubShell() : stub_session(std::make_shared<StubSession>()) | 34 | StubServer() : stub_session(std::make_shared<StubSession>()) |
231 | 35 | { | 35 | { |
232 | 36 | } | 36 | } |
233 | 37 | std::shared_ptr<frontend::Session> open_session(pid_t, std::string const& /* name */, std::shared_ptr<frontend::EventSink> const& /* sink */) override | 37 | std::shared_ptr<frontend::Session> open_session(pid_t, std::string const& /* name */, std::shared_ptr<frontend::EventSink> const& /* sink */) override |
234 | @@ -56,4 +56,4 @@ | |||
235 | 56 | } | 56 | } |
236 | 57 | } // namespace mir | 57 | } // namespace mir |
237 | 58 | 58 | ||
239 | 59 | #endif // MIR_TEST_DOUBLES_STUB_SHELL_H_ | 59 | #endif // MIR_TEST_DOUBLES_STUB_SERVER_H_ |
240 | 60 | 60 | ||
241 | === modified file 'src/server/frontend/default_configuration.cpp' | |||
242 | --- src/server/frontend/default_configuration.cpp 2014-03-26 05:48:59 +0000 | |||
243 | +++ src/server/frontend/default_configuration.cpp 2014-04-15 04:08:26 +0000 | |||
244 | @@ -41,14 +41,14 @@ | |||
245 | 41 | { | 41 | { |
246 | 42 | public: | 42 | public: |
247 | 43 | explicit DefaultIpcFactory( | 43 | explicit DefaultIpcFactory( |
249 | 44 | std::shared_ptr<mf::Shell> const& shell, | 44 | std::shared_ptr<mf::Server> const& server, |
250 | 45 | std::shared_ptr<mf::SessionMediatorReport> const& sm_report, | 45 | std::shared_ptr<mf::SessionMediatorReport> const& sm_report, |
251 | 46 | std::shared_ptr<mg::Platform> const& graphics_platform, | 46 | std::shared_ptr<mg::Platform> const& graphics_platform, |
252 | 47 | std::shared_ptr<mf::DisplayChanger> const& display_changer, | 47 | std::shared_ptr<mf::DisplayChanger> const& display_changer, |
253 | 48 | std::shared_ptr<mg::GraphicBufferAllocator> const& buffer_allocator, | 48 | std::shared_ptr<mg::GraphicBufferAllocator> const& buffer_allocator, |
254 | 49 | std::shared_ptr<mf::Screencast> const& screencast, | 49 | std::shared_ptr<mf::Screencast> const& screencast, |
255 | 50 | std::shared_ptr<mf::SessionAuthorizer> const& session_authorizer) : | 50 | std::shared_ptr<mf::SessionAuthorizer> const& session_authorizer) : |
257 | 51 | shell(shell), | 51 | server(server), |
258 | 52 | sm_report(sm_report), | 52 | sm_report(sm_report), |
259 | 53 | cache(std::make_shared<mf::ResourceCache>()), | 53 | cache(std::make_shared<mf::ResourceCache>()), |
260 | 54 | graphics_platform(graphics_platform), | 54 | graphics_platform(graphics_platform), |
261 | @@ -60,7 +60,7 @@ | |||
262 | 60 | } | 60 | } |
263 | 61 | 61 | ||
264 | 62 | private: | 62 | private: |
266 | 63 | std::shared_ptr<mf::Shell> shell; | 63 | std::shared_ptr<mf::Server> server; |
267 | 64 | std::shared_ptr<mf::SessionMediatorReport> const sm_report; | 64 | std::shared_ptr<mf::SessionMediatorReport> const sm_report; |
268 | 65 | std::shared_ptr<mf::ResourceCache> const cache; | 65 | std::shared_ptr<mf::ResourceCache> const cache; |
269 | 66 | std::shared_ptr<mg::Platform> const graphics_platform; | 66 | std::shared_ptr<mg::Platform> const graphics_platform; |
270 | @@ -96,7 +96,7 @@ | |||
271 | 96 | 96 | ||
272 | 97 | return std::make_shared<mf::SessionMediator>( | 97 | return std::make_shared<mf::SessionMediator>( |
273 | 98 | client_pid, | 98 | client_pid, |
275 | 99 | shell, | 99 | server, |
276 | 100 | graphics_platform, | 100 | graphics_platform, |
277 | 101 | changer, | 101 | changer, |
278 | 102 | buffer_allocator->supported_pixel_formats(), | 102 | buffer_allocator->supported_pixel_formats(), |
279 | @@ -119,7 +119,7 @@ | |||
280 | 119 | return session_creator([this] | 119 | return session_creator([this] |
281 | 120 | { | 120 | { |
282 | 121 | return std::make_shared<mf::ProtobufSessionCreator>( | 121 | return std::make_shared<mf::ProtobufSessionCreator>( |
284 | 122 | the_ipc_factory(the_frontend_shell(), the_buffer_allocator()), | 122 | the_ipc_factory(the_frontend_server(), the_buffer_allocator()), |
285 | 123 | the_session_authorizer(), | 123 | the_session_authorizer(), |
286 | 124 | the_message_processor_report()); | 124 | the_message_processor_report()); |
287 | 125 | }); | 125 | }); |
288 | @@ -153,14 +153,14 @@ | |||
289 | 153 | 153 | ||
290 | 154 | std::shared_ptr<mir::frontend::ProtobufIpcFactory> | 154 | std::shared_ptr<mir::frontend::ProtobufIpcFactory> |
291 | 155 | mir::DefaultServerConfiguration::the_ipc_factory( | 155 | mir::DefaultServerConfiguration::the_ipc_factory( |
293 | 156 | std::shared_ptr<mf::Shell> const& shell, | 156 | std::shared_ptr<mf::Server> const& server, |
294 | 157 | std::shared_ptr<mg::GraphicBufferAllocator> const& allocator) | 157 | std::shared_ptr<mg::GraphicBufferAllocator> const& allocator) |
295 | 158 | { | 158 | { |
296 | 159 | return ipc_factory( | 159 | return ipc_factory( |
297 | 160 | [&]() | 160 | [&]() |
298 | 161 | { | 161 | { |
299 | 162 | return std::make_shared<DefaultIpcFactory>( | 162 | return std::make_shared<DefaultIpcFactory>( |
301 | 163 | shell, | 163 | server, |
302 | 164 | the_session_mediator_report(), | 164 | the_session_mediator_report(), |
303 | 165 | the_graphics_platform(), | 165 | the_graphics_platform(), |
304 | 166 | the_frontend_display_changer(), | 166 | the_frontend_display_changer(), |
305 | 167 | 167 | ||
306 | === modified file 'src/server/frontend/session_mediator.cpp' | |||
307 | --- src/server/frontend/session_mediator.cpp 2014-04-08 09:06:37 +0000 | |||
308 | +++ src/server/frontend/session_mediator.cpp 2014-04-15 04:08:26 +0000 | |||
309 | @@ -20,7 +20,7 @@ | |||
310 | 20 | #include "client_buffer_tracker.h" | 20 | #include "client_buffer_tracker.h" |
311 | 21 | 21 | ||
312 | 22 | #include "mir/frontend/session_mediator_report.h" | 22 | #include "mir/frontend/session_mediator_report.h" |
314 | 23 | #include "mir/frontend/shell.h" | 23 | #include "mir/frontend/server.h" |
315 | 24 | #include "mir/frontend/session.h" | 24 | #include "mir/frontend/session.h" |
316 | 25 | #include "mir/frontend/surface.h" | 25 | #include "mir/frontend/surface.h" |
317 | 26 | #include "mir/scene/surface_creation_parameters.h" | 26 | #include "mir/scene/surface_creation_parameters.h" |
318 | @@ -60,7 +60,7 @@ | |||
319 | 60 | 60 | ||
320 | 61 | mf::SessionMediator::SessionMediator( | 61 | mf::SessionMediator::SessionMediator( |
321 | 62 | pid_t client_pid, | 62 | pid_t client_pid, |
323 | 63 | std::shared_ptr<frontend::Shell> const& shell, | 63 | std::shared_ptr<frontend::Server> const& server, |
324 | 64 | std::shared_ptr<graphics::Platform> const & graphics_platform, | 64 | std::shared_ptr<graphics::Platform> const & graphics_platform, |
325 | 65 | std::shared_ptr<mf::DisplayChanger> const& display_changer, | 65 | std::shared_ptr<mf::DisplayChanger> const& display_changer, |
326 | 66 | std::vector<MirPixelFormat> const& surface_pixel_formats, | 66 | std::vector<MirPixelFormat> const& surface_pixel_formats, |
327 | @@ -69,7 +69,7 @@ | |||
328 | 69 | std::shared_ptr<ResourceCache> const& resource_cache, | 69 | std::shared_ptr<ResourceCache> const& resource_cache, |
329 | 70 | std::shared_ptr<Screencast> const& screencast) : | 70 | std::shared_ptr<Screencast> const& screencast) : |
330 | 71 | client_pid(client_pid), | 71 | client_pid(client_pid), |
332 | 72 | shell(shell), | 72 | server(server), |
333 | 73 | graphics_platform(graphics_platform), | 73 | graphics_platform(graphics_platform), |
334 | 74 | surface_pixel_formats(surface_pixel_formats), | 74 | surface_pixel_formats(surface_pixel_formats), |
335 | 75 | display_changer(display_changer), | 75 | display_changer(display_changer), |
336 | @@ -85,7 +85,7 @@ | |||
337 | 85 | if (auto session = weak_session.lock()) | 85 | if (auto session = weak_session.lock()) |
338 | 86 | { | 86 | { |
339 | 87 | report->session_error(session->name(), __PRETTY_FUNCTION__, "connection dropped without disconnect"); | 87 | report->session_error(session->name(), __PRETTY_FUNCTION__, "connection dropped without disconnect"); |
341 | 88 | shell->close_session(session); | 88 | server->close_session(session); |
342 | 89 | } | 89 | } |
343 | 90 | } | 90 | } |
344 | 91 | 91 | ||
345 | @@ -99,7 +99,7 @@ | |||
346 | 99 | 99 | ||
347 | 100 | { | 100 | { |
348 | 101 | std::unique_lock<std::mutex> lock(session_mutex); | 101 | std::unique_lock<std::mutex> lock(session_mutex); |
350 | 102 | weak_session = shell->open_session(client_pid, request->application_name(), event_sink); | 102 | weak_session = server->open_session(client_pid, request->application_name(), event_sink); |
351 | 103 | } | 103 | } |
352 | 104 | 104 | ||
353 | 105 | auto ipc_package = graphics_platform->get_ipc_package(); | 105 | auto ipc_package = graphics_platform->get_ipc_package(); |
354 | @@ -191,7 +191,7 @@ | |||
355 | 191 | // To achieve this order we rely on done->Run() sending messages synchronously. As documented in mfd::SocketMessenger::send. | 191 | // To achieve this order we rely on done->Run() sending messages synchronously. As documented in mfd::SocketMessenger::send. |
356 | 192 | // this will require additional synchronization if mfd::SocketMessenger::send changes. | 192 | // this will require additional synchronization if mfd::SocketMessenger::send changes. |
357 | 193 | done->Run(); | 193 | done->Run(); |
359 | 194 | shell->handle_surface_created(session); | 194 | server->handle_surface_created(session); |
360 | 195 | }); | 195 | }); |
361 | 196 | } | 196 | } |
362 | 197 | 197 | ||
363 | @@ -267,7 +267,7 @@ | |||
364 | 267 | 267 | ||
365 | 268 | report->session_disconnect_called(session->name()); | 268 | report->session_disconnect_called(session->name()); |
366 | 269 | 269 | ||
368 | 270 | shell->close_session(session); | 270 | server->close_session(session); |
369 | 271 | weak_session.reset(); | 271 | weak_session.reset(); |
370 | 272 | } | 272 | } |
371 | 273 | 273 | ||
372 | 274 | 274 | ||
373 | === modified file 'src/server/frontend/session_mediator.h' | |||
374 | --- src/server/frontend/session_mediator.h 2014-03-06 06:05:17 +0000 | |||
375 | +++ src/server/frontend/session_mediator.h 2014-04-15 04:08:26 +0000 | |||
376 | @@ -46,7 +46,7 @@ | |||
377 | 46 | namespace frontend | 46 | namespace frontend |
378 | 47 | { | 47 | { |
379 | 48 | class ClientBufferTracker; | 48 | class ClientBufferTracker; |
381 | 49 | class Shell; | 49 | class Server; |
382 | 50 | class Session; | 50 | class Session; |
383 | 51 | class Surface; | 51 | class Surface; |
384 | 52 | class ResourceCache; | 52 | class ResourceCache; |
385 | @@ -61,7 +61,7 @@ | |||
386 | 61 | public: | 61 | public: |
387 | 62 | SessionMediator( | 62 | SessionMediator( |
388 | 63 | pid_t client_pid, | 63 | pid_t client_pid, |
390 | 64 | std::shared_ptr<Shell> const& shell, | 64 | std::shared_ptr<Server> const& server, |
391 | 65 | std::shared_ptr<graphics::Platform> const& graphics_platform, | 65 | std::shared_ptr<graphics::Platform> const& graphics_platform, |
392 | 66 | std::shared_ptr<frontend::DisplayChanger> const& display_changer, | 66 | std::shared_ptr<frontend::DisplayChanger> const& display_changer, |
393 | 67 | std::vector<MirPixelFormat> const& surface_pixel_formats, | 67 | std::vector<MirPixelFormat> const& surface_pixel_formats, |
394 | @@ -137,7 +137,7 @@ | |||
395 | 137 | 137 | ||
396 | 138 | void advance_buffer(SurfaceId surf_id, Surface& surface, std::function<void(graphics::Buffer*, bool)> complete); | 138 | void advance_buffer(SurfaceId surf_id, Surface& surface, std::function<void(graphics::Buffer*, bool)> complete); |
397 | 139 | pid_t client_pid; | 139 | pid_t client_pid; |
399 | 140 | std::shared_ptr<Shell> const shell; | 140 | std::shared_ptr<Server> const server; |
400 | 141 | std::shared_ptr<graphics::Platform> const graphics_platform; | 141 | std::shared_ptr<graphics::Platform> const graphics_platform; |
401 | 142 | 142 | ||
402 | 143 | std::vector<MirPixelFormat> const surface_pixel_formats; | 143 | std::vector<MirPixelFormat> const surface_pixel_formats; |
403 | 144 | 144 | ||
404 | === modified file 'src/server/scene/default_configuration.cpp' | |||
405 | --- src/server/scene/default_configuration.cpp 2014-04-14 11:31:04 +0000 | |||
406 | +++ src/server/scene/default_configuration.cpp 2014-04-15 04:08:26 +0000 | |||
407 | @@ -187,8 +187,8 @@ | |||
408 | 187 | }); | 187 | }); |
409 | 188 | } | 188 | } |
410 | 189 | 189 | ||
413 | 190 | std::shared_ptr<mf::Shell> | 190 | std::shared_ptr<mf::Server> |
414 | 191 | mir::DefaultServerConfiguration::the_frontend_shell() | 191 | mir::DefaultServerConfiguration::the_frontend_server() |
415 | 192 | { | 192 | { |
416 | 193 | return the_session_manager(); | 193 | return the_session_manager(); |
417 | 194 | } | 194 | } |
418 | 195 | 195 | ||
419 | === modified file 'src/server/scene/session_manager.h' | |||
420 | --- src/server/scene/session_manager.h 2014-04-08 09:06:37 +0000 | |||
421 | +++ src/server/scene/session_manager.h 2014-04-15 04:08:26 +0000 | |||
422 | @@ -20,7 +20,7 @@ | |||
423 | 20 | #define MIR_SCENE_APPLICATION_MANAGER_H_ | 20 | #define MIR_SCENE_APPLICATION_MANAGER_H_ |
424 | 21 | 21 | ||
425 | 22 | #include "mir/frontend/surface_id.h" | 22 | #include "mir/frontend/surface_id.h" |
427 | 23 | #include "mir/frontend/shell.h" | 23 | #include "mir/frontend/server.h" |
428 | 24 | #include "mir/shell/focus_controller.h" | 24 | #include "mir/shell/focus_controller.h" |
429 | 25 | 25 | ||
430 | 26 | #include <mutex> | 26 | #include <mutex> |
431 | @@ -43,7 +43,7 @@ | |||
432 | 43 | class SnapshotStrategy; | 43 | class SnapshotStrategy; |
433 | 44 | class SurfaceCoordinator; | 44 | class SurfaceCoordinator; |
434 | 45 | 45 | ||
436 | 46 | class SessionManager : public frontend::Shell, public shell::FocusController | 46 | class SessionManager : public frontend::Server, public shell::FocusController |
437 | 47 | { | 47 | { |
438 | 48 | public: | 48 | public: |
439 | 49 | explicit SessionManager(std::shared_ptr<SurfaceCoordinator> const& surface_coordinator, | 49 | explicit SessionManager(std::shared_ptr<SurfaceCoordinator> const& surface_coordinator, |
440 | 50 | 50 | ||
441 | === modified file 'tests/acceptance-tests/test_protobuf.cpp' | |||
442 | --- tests/acceptance-tests/test_protobuf.cpp 2014-03-26 05:48:59 +0000 | |||
443 | +++ tests/acceptance-tests/test_protobuf.cpp 2014-04-15 04:08:26 +0000 | |||
444 | @@ -141,7 +141,7 @@ | |||
445 | 141 | return session_creator([this] | 141 | return session_creator([this] |
446 | 142 | { | 142 | { |
447 | 143 | return std::make_shared<DemoSessionCreator>( | 143 | return std::make_shared<DemoSessionCreator>( |
449 | 144 | the_ipc_factory(the_frontend_shell(), the_buffer_allocator()), | 144 | the_ipc_factory(the_frontend_server(), the_buffer_allocator()), |
450 | 145 | the_session_authorizer(), | 145 | the_session_authorizer(), |
451 | 146 | the_message_processor_report()); | 146 | the_message_processor_report()); |
452 | 147 | }); | 147 | }); |
453 | 148 | 148 | ||
454 | === modified file 'tests/integration-tests/session_management.cpp' | |||
455 | --- tests/integration-tests/session_management.cpp 2014-04-08 17:21:28 +0000 | |||
456 | +++ tests/integration-tests/session_management.cpp 2014-04-15 04:08:26 +0000 | |||
457 | @@ -17,7 +17,7 @@ | |||
458 | 17 | */ | 17 | */ |
459 | 18 | 18 | ||
460 | 19 | #include "mir/frontend/session.h" | 19 | #include "mir/frontend/session.h" |
462 | 20 | #include "mir/frontend/shell.h" | 20 | #include "mir/frontend/server.h" |
463 | 21 | #include "mir/input/input_configuration.h" | 21 | #include "mir/input/input_configuration.h" |
464 | 22 | 22 | ||
465 | 23 | #include "mir/scene/surface_creation_parameters.h" | 23 | #include "mir/scene/surface_creation_parameters.h" |
466 | @@ -100,7 +100,7 @@ | |||
467 | 100 | { | 100 | { |
468 | 101 | TestConfiguration builder; | 101 | TestConfiguration builder; |
469 | 102 | std::shared_ptr<mf::EventSink> const event_sink = std::make_shared<mtd::NullEventSink>(); | 102 | std::shared_ptr<mf::EventSink> const event_sink = std::make_shared<mtd::NullEventSink>(); |
471 | 103 | std::shared_ptr<mf::Shell> const session_manager = builder.the_frontend_shell(); | 103 | std::shared_ptr<mf::Server> const session_manager = builder.the_frontend_server(); |
472 | 104 | std::shared_ptr<TestSurfaceStack> const& test_surface_stack = builder.test_surface_stack; | 104 | std::shared_ptr<TestSurfaceStack> const& test_surface_stack = builder.test_surface_stack; |
473 | 105 | 105 | ||
474 | 106 | void SetUp() | 106 | void SetUp() |
475 | 107 | 107 | ||
476 | === modified file 'tests/integration-tests/test_error_reporting.cpp' | |||
477 | --- tests/integration-tests/test_error_reporting.cpp 2014-03-06 06:05:17 +0000 | |||
478 | +++ tests/integration-tests/test_error_reporting.cpp 2014-04-15 04:08:26 +0000 | |||
479 | @@ -206,7 +206,7 @@ | |||
480 | 206 | struct ServerConfig : TestingServerConfiguration | 206 | struct ServerConfig : TestingServerConfiguration |
481 | 207 | { | 207 | { |
482 | 208 | std::shared_ptr<mf::ProtobufIpcFactory> the_ipc_factory( | 208 | std::shared_ptr<mf::ProtobufIpcFactory> the_ipc_factory( |
484 | 209 | std::shared_ptr<mir::frontend::Shell> const&, | 209 | std::shared_ptr<mir::frontend::Server> const&, |
485 | 210 | std::shared_ptr<mg::GraphicBufferAllocator> const&) override | 210 | std::shared_ptr<mg::GraphicBufferAllocator> const&) override |
486 | 211 | { | 211 | { |
487 | 212 | static auto error_server = std::make_shared<ErrorServer>(); | 212 | static auto error_server = std::make_shared<ErrorServer>(); |
488 | 213 | 213 | ||
489 | === modified file 'tests/mir_test_framework/input_testing_server_options.cpp' | |||
490 | --- tests/mir_test_framework/input_testing_server_options.cpp 2014-04-08 09:06:37 +0000 | |||
491 | +++ tests/mir_test_framework/input_testing_server_options.cpp 2014-04-15 04:08:26 +0000 | |||
492 | @@ -22,7 +22,6 @@ | |||
493 | 22 | #include "mir/scene/input_registrar.h" | 22 | #include "mir/scene/input_registrar.h" |
494 | 23 | #include "mir/input/surface.h" | 23 | #include "mir/input/surface.h" |
495 | 24 | #include "mir/scene/surface_creation_parameters.h" | 24 | #include "mir/scene/surface_creation_parameters.h" |
496 | 25 | #include "mir/frontend/shell.h" | ||
497 | 26 | #include "mir/frontend/session.h" | 25 | #include "mir/frontend/session.h" |
498 | 27 | #include "mir/input/composite_event_filter.h" | 26 | #include "mir/input/composite_event_filter.h" |
499 | 28 | 27 | ||
500 | 29 | 28 | ||
501 | === modified file 'tests/unit-tests/frontend/test_session_mediator.cpp' | |||
502 | --- tests/unit-tests/frontend/test_session_mediator.cpp 2014-04-08 09:06:37 +0000 | |||
503 | +++ tests/unit-tests/frontend/test_session_mediator.cpp 2014-04-15 04:08:26 +0000 | |||
504 | @@ -32,7 +32,7 @@ | |||
505 | 32 | #include "mir_test_doubles/null_event_sink.h" | 32 | #include "mir_test_doubles/null_event_sink.h" |
506 | 33 | #include "mir_test_doubles/null_display_changer.h" | 33 | #include "mir_test_doubles/null_display_changer.h" |
507 | 34 | #include "mir_test_doubles/mock_display.h" | 34 | #include "mir_test_doubles/mock_display.h" |
509 | 35 | #include "mir_test_doubles/mock_shell.h" | 35 | #include "mir_test_doubles/mock_server.h" |
510 | 36 | #include "mir_test_doubles/mock_frontend_surface.h" | 36 | #include "mir_test_doubles/mock_frontend_surface.h" |
511 | 37 | #include "mir_test_doubles/mock_buffer.h" | 37 | #include "mir_test_doubles/mock_buffer.h" |
512 | 38 | #include "mir_test_doubles/stub_session.h" | 38 | #include "mir_test_doubles/stub_session.h" |
513 | @@ -198,14 +198,14 @@ | |||
514 | 198 | struct SessionMediatorTest : public ::testing::Test | 198 | struct SessionMediatorTest : public ::testing::Test |
515 | 199 | { | 199 | { |
516 | 200 | SessionMediatorTest() | 200 | SessionMediatorTest() |
518 | 201 | : shell{std::make_shared<testing::NiceMock<mtd::MockShell>>()}, | 201 | : server{std::make_shared<testing::NiceMock<mtd::MockServer>>()}, |
519 | 202 | graphics_platform{std::make_shared<testing::NiceMock<MockPlatform>>()}, | 202 | graphics_platform{std::make_shared<testing::NiceMock<MockPlatform>>()}, |
520 | 203 | graphics_changer{std::make_shared<mtd::NullDisplayChanger>()}, | 203 | graphics_changer{std::make_shared<mtd::NullDisplayChanger>()}, |
521 | 204 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, | 204 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, |
522 | 205 | report{mr::null_session_mediator_report()}, | 205 | report{mr::null_session_mediator_report()}, |
523 | 206 | resource_cache{std::make_shared<mf::ResourceCache>()}, | 206 | resource_cache{std::make_shared<mf::ResourceCache>()}, |
524 | 207 | stub_screencast{std::make_shared<StubScreencast>()}, | 207 | stub_screencast{std::make_shared<StubScreencast>()}, |
526 | 208 | mediator{__LINE__, shell, graphics_platform, graphics_changer, | 208 | mediator{__LINE__, server, graphics_platform, graphics_changer, |
527 | 209 | surface_pixel_formats, report, | 209 | surface_pixel_formats, report, |
528 | 210 | std::make_shared<mtd::NullEventSink>(), | 210 | std::make_shared<mtd::NullEventSink>(), |
529 | 211 | resource_cache, stub_screencast}, | 211 | resource_cache, stub_screencast}, |
530 | @@ -214,12 +214,12 @@ | |||
531 | 214 | { | 214 | { |
532 | 215 | using namespace ::testing; | 215 | using namespace ::testing; |
533 | 216 | 216 | ||
536 | 217 | ON_CALL(*shell, open_session(_, _, _)).WillByDefault(Return(stubbed_session)); | 217 | ON_CALL(*server, open_session(_, _, _)).WillByDefault(Return(stubbed_session)); |
537 | 218 | ON_CALL(*shell, create_surface_for(_, _)) | 218 | ON_CALL(*server, create_surface_for(_, _)) |
538 | 219 | .WillByDefault(WithArg<1>(Invoke(stubbed_session.get(), &StubbedSession::create_surface))); | 219 | .WillByDefault(WithArg<1>(Invoke(stubbed_session.get(), &StubbedSession::create_surface))); |
539 | 220 | } | 220 | } |
540 | 221 | 221 | ||
542 | 222 | std::shared_ptr<testing::NiceMock<mtd::MockShell>> const shell; | 222 | std::shared_ptr<testing::NiceMock<mtd::MockServer>> const server; |
543 | 223 | std::shared_ptr<MockPlatform> const graphics_platform; | 223 | std::shared_ptr<MockPlatform> const graphics_platform; |
544 | 224 | std::shared_ptr<mf::DisplayChanger> const graphics_changer; | 224 | std::shared_ptr<mf::DisplayChanger> const graphics_changer; |
545 | 225 | std::vector<MirPixelFormat> const surface_pixel_formats; | 225 | std::vector<MirPixelFormat> const surface_pixel_formats; |
546 | @@ -240,7 +240,7 @@ | |||
547 | 240 | mp::ConnectParameters connect_parameters; | 240 | mp::ConnectParameters connect_parameters; |
548 | 241 | mp::Connection connection; | 241 | mp::Connection connection; |
549 | 242 | 242 | ||
551 | 243 | EXPECT_CALL(*shell, close_session(_)).Times(1); | 243 | EXPECT_CALL(*server, close_session(_)).Times(1); |
552 | 244 | 244 | ||
553 | 245 | mediator.connect(nullptr, &connect_parameters, &connection, null_callback.get()); | 245 | mediator.connect(nullptr, &connect_parameters, &connection, null_callback.get()); |
554 | 246 | mediator.disconnect(nullptr, nullptr, nullptr, null_callback.get()); | 246 | mediator.disconnect(nullptr, nullptr, nullptr, null_callback.get()); |
555 | @@ -369,7 +369,7 @@ | |||
556 | 369 | .Times(1) | 369 | .Times(1) |
557 | 370 | .WillOnce(Return(mt::fake_shared(config))); | 370 | .WillOnce(Return(mt::fake_shared(config))); |
558 | 371 | mf::SessionMediator mediator( | 371 | mf::SessionMediator mediator( |
560 | 372 | __LINE__, shell, graphics_platform, mock_display, | 372 | __LINE__, server, graphics_platform, mock_display, |
561 | 373 | surface_pixel_formats, report, | 373 | surface_pixel_formats, report, |
562 | 374 | std::make_shared<mtd::NullEventSink>(), | 374 | std::make_shared<mtd::NullEventSink>(), |
563 | 375 | resource_cache, std::make_shared<mtd::NullScreencast>()); | 375 | resource_cache, std::make_shared<mtd::NullScreencast>()); |
564 | @@ -593,7 +593,7 @@ | |||
565 | 593 | .WillOnce(Return(mt::fake_shared(stub_display_config))); | 593 | .WillOnce(Return(mt::fake_shared(stub_display_config))); |
566 | 594 | 594 | ||
567 | 595 | mf::SessionMediator session_mediator{ | 595 | mf::SessionMediator session_mediator{ |
569 | 596 | __LINE__, shell, graphics_platform, mock_display_selector, | 596 | __LINE__, server, graphics_platform, mock_display_selector, |
570 | 597 | surface_pixel_formats, report, | 597 | surface_pixel_formats, report, |
571 | 598 | std::make_shared<mtd::NullEventSink>(), resource_cache, | 598 | std::make_shared<mtd::NullEventSink>(), resource_cache, |
572 | 599 | std::make_shared<mtd::NullScreencast>()}; | 599 | std::make_shared<mtd::NullScreencast>()}; |
573 | 600 | 600 | ||
574 | === modified file 'tests/unit-tests/frontend/test_session_mediator_android.cpp' | |||
575 | --- tests/unit-tests/frontend/test_session_mediator_android.cpp 2014-04-08 12:26:40 +0000 | |||
576 | +++ tests/unit-tests/frontend/test_session_mediator_android.cpp 2014-04-15 04:08:26 +0000 | |||
577 | @@ -21,7 +21,7 @@ | |||
578 | 21 | #include "src/server/frontend/resource_cache.h" | 21 | #include "src/server/frontend/resource_cache.h" |
579 | 22 | #include "src/server/scene/application_session.h" | 22 | #include "src/server/scene/application_session.h" |
580 | 23 | #include "src/server/report/null_report_factory.h" | 23 | #include "src/server/report/null_report_factory.h" |
582 | 24 | #include "mir/frontend/shell.h" | 24 | #include "mir/frontend/server.h" |
583 | 25 | #include "mir/scene/surface_creation_parameters.h" | 25 | #include "mir/scene/surface_creation_parameters.h" |
584 | 26 | #include "mir/graphics/display.h" | 26 | #include "mir/graphics/display.h" |
585 | 27 | #include "mir/graphics/platform.h" | 27 | #include "mir/graphics/platform.h" |
586 | @@ -29,7 +29,7 @@ | |||
587 | 29 | 29 | ||
588 | 30 | #include "mir_test_doubles/null_display_changer.h" | 30 | #include "mir_test_doubles/null_display_changer.h" |
589 | 31 | #include "mir_test_doubles/mock_session.h" | 31 | #include "mir_test_doubles/mock_session.h" |
591 | 32 | #include "mir_test_doubles/stub_shell.h" | 32 | #include "mir_test_doubles/stub_server.h" |
592 | 33 | #include "mir_test_doubles/null_platform.h" | 33 | #include "mir_test_doubles/null_platform.h" |
593 | 34 | #include "mir_test_doubles/null_event_sink.h" | 34 | #include "mir_test_doubles/null_event_sink.h" |
594 | 35 | #include "mir_test_doubles/stub_buffer_allocator.h" | 35 | #include "mir_test_doubles/stub_buffer_allocator.h" |
595 | @@ -52,13 +52,13 @@ | |||
596 | 52 | struct SessionMediatorAndroidTest : public ::testing::Test | 52 | struct SessionMediatorAndroidTest : public ::testing::Test |
597 | 53 | { | 53 | { |
598 | 54 | SessionMediatorAndroidTest() | 54 | SessionMediatorAndroidTest() |
600 | 55 | : shell{std::make_shared<mtd::StubShell>()}, | 55 | : server{std::make_shared<mtd::StubServer>()}, |
601 | 56 | graphics_platform{std::make_shared<mtd::NullPlatform>()}, | 56 | graphics_platform{std::make_shared<mtd::NullPlatform>()}, |
602 | 57 | display_changer{std::make_shared<mtd::NullDisplayChanger>()}, | 57 | display_changer{std::make_shared<mtd::NullDisplayChanger>()}, |
603 | 58 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, | 58 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, |
604 | 59 | report{mr::null_session_mediator_report()}, | 59 | report{mr::null_session_mediator_report()}, |
605 | 60 | resource_cache{std::make_shared<mf::ResourceCache>()}, | 60 | resource_cache{std::make_shared<mf::ResourceCache>()}, |
607 | 61 | mediator{__LINE__, shell, graphics_platform, display_changer, | 61 | mediator{__LINE__, server, graphics_platform, display_changer, |
608 | 62 | surface_pixel_formats, report, | 62 | surface_pixel_formats, report, |
609 | 63 | std::make_shared<mtd::NullEventSink>(), | 63 | std::make_shared<mtd::NullEventSink>(), |
610 | 64 | resource_cache, std::make_shared<mtd::NullScreencast>()}, | 64 | resource_cache, std::make_shared<mtd::NullScreencast>()}, |
611 | @@ -66,7 +66,7 @@ | |||
612 | 66 | { | 66 | { |
613 | 67 | } | 67 | } |
614 | 68 | 68 | ||
616 | 69 | std::shared_ptr<mtd::StubShell> const shell; | 69 | std::shared_ptr<mtd::StubServer> const server; |
617 | 70 | std::shared_ptr<mtd::NullPlatform> const graphics_platform; | 70 | std::shared_ptr<mtd::NullPlatform> const graphics_platform; |
618 | 71 | std::shared_ptr<mf::DisplayChanger> const display_changer; | 71 | std::shared_ptr<mf::DisplayChanger> const display_changer; |
619 | 72 | std::vector<MirPixelFormat> const surface_pixel_formats; | 72 | std::vector<MirPixelFormat> const surface_pixel_formats; |
620 | 73 | 73 | ||
621 | === modified file 'tests/unit-tests/frontend/test_session_mediator_mesa.cpp' | |||
622 | --- tests/unit-tests/frontend/test_session_mediator_mesa.cpp 2014-04-08 12:26:40 +0000 | |||
623 | +++ tests/unit-tests/frontend/test_session_mediator_mesa.cpp 2014-04-15 04:08:26 +0000 | |||
624 | @@ -22,7 +22,7 @@ | |||
625 | 22 | #include "src/server/scene/application_session.h" | 22 | #include "src/server/scene/application_session.h" |
626 | 23 | #include "src/server/frontend/session_mediator.h" | 23 | #include "src/server/frontend/session_mediator.h" |
627 | 24 | #include "src/server/report/null_report_factory.h" | 24 | #include "src/server/report/null_report_factory.h" |
629 | 25 | #include "mir/frontend/shell.h" | 25 | #include "mir/frontend/server.h" |
630 | 26 | #include "mir/graphics/display.h" | 26 | #include "mir/graphics/display.h" |
631 | 27 | #include "mir/graphics/drm_authenticator.h" | 27 | #include "mir/graphics/drm_authenticator.h" |
632 | 28 | #include "mir/frontend/event_sink.h" | 28 | #include "mir/frontend/event_sink.h" |
633 | @@ -35,7 +35,7 @@ | |||
634 | 35 | #include "mir_test_doubles/null_display_changer.h" | 35 | #include "mir_test_doubles/null_display_changer.h" |
635 | 36 | #include "mir_test_doubles/null_platform.h" | 36 | #include "mir_test_doubles/null_platform.h" |
636 | 37 | #include "mir_test_doubles/mock_session.h" | 37 | #include "mir_test_doubles/mock_session.h" |
638 | 38 | #include "mir_test_doubles/stub_shell.h" | 38 | #include "mir_test_doubles/stub_server.h" |
639 | 39 | #include "mir_test_doubles/null_screencast.h" | 39 | #include "mir_test_doubles/null_screencast.h" |
640 | 40 | 40 | ||
641 | 41 | #include <gtest/gtest.h> | 41 | #include <gtest/gtest.h> |
642 | @@ -66,13 +66,13 @@ | |||
643 | 66 | struct SessionMediatorMesaTest : public ::testing::Test | 66 | struct SessionMediatorMesaTest : public ::testing::Test |
644 | 67 | { | 67 | { |
645 | 68 | SessionMediatorMesaTest() | 68 | SessionMediatorMesaTest() |
647 | 69 | : shell{std::make_shared<mtd::StubShell>()}, | 69 | : server{std::make_shared<mtd::StubServer>()}, |
648 | 70 | mock_platform{std::make_shared<MockAuthenticatingPlatform>()}, | 70 | mock_platform{std::make_shared<MockAuthenticatingPlatform>()}, |
649 | 71 | display_changer{std::make_shared<mtd::NullDisplayChanger>()}, | 71 | display_changer{std::make_shared<mtd::NullDisplayChanger>()}, |
650 | 72 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, | 72 | surface_pixel_formats{mir_pixel_format_argb_8888, mir_pixel_format_xrgb_8888}, |
651 | 73 | report{mr::null_session_mediator_report()}, | 73 | report{mr::null_session_mediator_report()}, |
652 | 74 | resource_cache{std::make_shared<mf::ResourceCache>()}, | 74 | resource_cache{std::make_shared<mf::ResourceCache>()}, |
654 | 75 | mediator{__LINE__, shell, mock_platform, display_changer, | 75 | mediator{__LINE__, server, mock_platform, display_changer, |
655 | 76 | surface_pixel_formats, report, | 76 | surface_pixel_formats, report, |
656 | 77 | std::make_shared<mtd::NullEventSink>(), | 77 | std::make_shared<mtd::NullEventSink>(), |
657 | 78 | resource_cache, std::make_shared<mtd::NullScreencast>()}, | 78 | resource_cache, std::make_shared<mtd::NullScreencast>()}, |
658 | @@ -80,7 +80,7 @@ | |||
659 | 80 | { | 80 | { |
660 | 81 | } | 81 | } |
661 | 82 | 82 | ||
663 | 83 | std::shared_ptr<mtd::StubShell> const shell; | 83 | std::shared_ptr<mtd::StubServer> const server; |
664 | 84 | std::shared_ptr<MockAuthenticatingPlatform> const mock_platform; | 84 | std::shared_ptr<MockAuthenticatingPlatform> const mock_platform; |
665 | 85 | std::shared_ptr<mf::DisplayChanger> const display_changer; | 85 | std::shared_ptr<mf::DisplayChanger> const display_changer; |
666 | 86 | std::vector<MirPixelFormat> const surface_pixel_formats; | 86 | std::vector<MirPixelFormat> const surface_pixel_formats; |
PASSED: Continuous integration, rev:1417 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- ci/916/ jenkins. qa.ubuntu. com/job/ mir-android- trusty- i386-build/ 1007 jenkins. qa.ubuntu. com/job/ mir-clang- trusty- amd64-build/ 1005 jenkins. qa.ubuntu. com/job/ mir-mediumtests -trusty- touch/599 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 646 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 646/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- armhf-ci/ 653 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- armhf-ci/ 653/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- trusty- armhf/600 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- trusty- armhf/600/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/575 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 4173
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- team-mir- development- branch- ci/916/ rebuild
http://