~mir-team/mir/trunk

« back to all changes in this revision

Viewing changes to src/client/mir_client_library.cpp

  • Committer: Tarmac
  • Author(s): Alan Griffiths
  • Date: 2013-04-25 23:50:01 UTC
  • mfrom: (526.2.22 mir1)
  • Revision ID: tarmac-20130425235001-c3b3x2yyb3eldyx1
frontend, shell, tests: surface-states updated to avoid supplying dependencies through public member functions.

Approved by PS Jenkins bot, Chris Halse Rogers, Robert Ancell, Kevin DuBois.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
#include "native_client_platform_factory.h"
27
27
#include "egl_native_display_container.h"
28
28
#include "mir_logger.h"
29
 
#include "mir_socket_rpc_channel.h"
 
29
#include "make_rpc_channel.h"
30
30
 
31
31
#include <set>
32
32
#include <unordered_set>
60
60
        auto log = std::make_shared<mcl::ConsoleLogger>();
61
61
        auto client_platform_factory = std::make_shared<mcl::NativeClientPlatformFactory>();
62
62
 
63
 
        auto rpc = std::make_shared<mcl::MirSocketRpcChannel>(sock, log);
64
 
 
65
 
        MirConnection* connection = new MirConnection(rpc, log,
66
 
                                                      client_platform_factory);
67
 
        
68
 
        rpc->set_event_handler(connection);
 
63
        MirConnection* connection = new MirConnection(
 
64
            mcl::make_rpc_channel(sock, log),
 
65
            log,
 
66
            client_platform_factory);
69
67
 
70
68
        return connection->connect(name, callback, context);
71
69
    }
258
256
    auto log = std::make_shared<mcl::ConsoleLogger>();
259
257
    auto client_platform_factory = std::make_shared<mcl::NativeClientPlatformFactory>();
260
258
 
261
 
    auto rpc = std::make_shared<mcl::MirSocketRpcChannel>(server, log);
262
 
 
263
 
    MirConnection* connection = new MirConnection(rpc, log,
264
 
                                                  client_platform_factory);
265
 
 
266
 
    rpc->set_event_handler(connection);
 
259
    MirConnection* connection = new MirConnection(
 
260
        mcl::make_rpc_channel(server, log),
 
261
        log,
 
262
        client_platform_factory);
267
263
 
268
264
    return connection->connect(lightdm_id, app_name, callback, client_context);
269
265
}