~robertcarr/mir/send-clients-input

« back to all changes in this revision

Viewing changes to include/mir/frontend/application_mediator.h

  • Committer: Daniel van Vugt
  • Date: 2013-03-07 08:04:05 UTC
  • mfrom: (467.1.6 trunk)
  • mto: (467.1.21 trunk)
  • mto: This revision was merged to the branch mainline in revision 486.
  • Revision ID: daniel.van.vugt@canonical.com-20130307080405-vgn5g2ts7j08xekk
Merge latest lp:mir

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Copyright © 2012 Canonical Ltd.
3
3
 *
4
 
 * This program is free software: you can redistribute it and/or modify
5
 
 * it under the terms of the GNU General Public License version 3 as
6
 
 * published by the Free Software Foundation.
 
4
 * 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,
 
6
 * as published by the Free Software Foundation.
7
7
 *
8
8
 * This program is distributed in the hope that it will be useful,
9
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
11
 * GNU General Public License for more details.
12
12
 *
13
 
 * You should have received a copy of the GNU General Public License
 
13
 * You should have received a copy of the GNU Lesser General Public License
14
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
15
15
 *
16
16
 * Authored by: Alan Griffiths <alan@octopull.co.uk>
30
30
namespace graphics
31
31
{
32
32
class Platform;
33
 
class Display;
 
33
class ViewableArea;
34
34
}
35
35
 
36
36
namespace compositor
38
38
class GraphicBufferAllocator;
39
39
}
40
40
 
41
 
namespace sessions
 
41
namespace shell
42
42
{
43
43
class SessionStore;
44
44
class Session;
49
49
namespace frontend
50
50
{
51
51
class ResourceCache;
52
 
class ApplicationListener;
 
52
class ApplicationMediatorReport;
53
53
 
54
54
// ApplicationMediator relays requests from the client into the server process.
55
55
class ApplicationMediator : public mir::protobuf::DisplayServer
57
57
public:
58
58
 
59
59
    ApplicationMediator(
60
 
        std::shared_ptr<sessions::SessionStore> const& session_store,
 
60
        std::shared_ptr<shell::SessionStore> const& session_store,
61
61
        std::shared_ptr<graphics::Platform> const& graphics_platform,
62
 
        std::shared_ptr<graphics::Display> const& graphics_display,
 
62
        std::shared_ptr<graphics::ViewableArea> const& viewable_area,
63
63
        std::shared_ptr<compositor::GraphicBufferAllocator> const& buffer_allocator,
64
 
        std::shared_ptr<ApplicationListener> const& listener,
 
64
        std::shared_ptr<ApplicationMediatorReport> const& report,
65
65
        std::shared_ptr<ResourceCache> const& resource_cache);
66
66
 
67
67
    /* Platform independent requests */
104
104
                        google::protobuf::Closure* done);
105
105
 
106
106
private:
107
 
    std::shared_ptr<sessions::SessionStore> const session_store;
 
107
    std::shared_ptr<shell::SessionStore> const session_store;
108
108
    std::shared_ptr<graphics::Platform> const graphics_platform;
109
 
    std::shared_ptr<graphics::Display> const graphics_display;
 
109
 
 
110
    // TODO this is a dubious dependency - to get display_info (is there only one?)
 
111
    std::shared_ptr<graphics::ViewableArea> const viewable_area;
 
112
    // TODO this is a dubious dependency - to get supported_pixel_formats
110
113
    std::shared_ptr<compositor::GraphicBufferAllocator> const buffer_allocator;
111
 
    std::shared_ptr<ApplicationListener> const listener;
112
114
 
 
115
    std::shared_ptr<ApplicationMediatorReport> const report;
113
116
    std::shared_ptr<ResourceCache> const resource_cache;
114
117
 
115
 
    std::shared_ptr<sessions::Session> application_session;
 
118
    std::shared_ptr<shell::Session> application_session;
116
119
};
117
120
 
118
121
}