forked from flutter-tizen/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplatform_channel.h
More file actions
40 lines (32 loc) · 1.45 KB
/
platform_channel.h
File metadata and controls
40 lines (32 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// Copyright 2020 Samsung Electronics Co., Ltd. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef EMBEDDER_PLATFORM_CHANNEL_H_
#define EMBEDDER_PLATFORM_CHANNEL_H_
#include "flutter/shell/platform/common/cpp/client_wrapper/include/flutter/binary_messenger.h"
#include "flutter/shell/platform/common/cpp/client_wrapper/include/flutter/method_channel.h"
#include "flutter/shell/platform/tizen/tizen_renderer.h"
#include "rapidjson/document.h"
class PlatformChannel {
public:
explicit PlatformChannel(flutter::BinaryMessenger* messenger,
TizenRenderer* renderer);
virtual ~PlatformChannel();
private:
void HandleMethodCall(
const flutter::MethodCall<rapidjson::Document>& call,
std::unique_ptr<flutter::MethodResult<rapidjson::Document>> result);
std::unique_ptr<flutter::MethodChannel<rapidjson::Document>> channel_;
// A reference to the renderer object managed by FlutterTizenEngine.
// This can be nullptr if the engine is running in headless mode.
TizenRenderer* renderer_;
};
namespace Clipboard {
void GetData(
const flutter::MethodCall<rapidjson::Document>& call,
std::unique_ptr<flutter::MethodResult<rapidjson::Document>> result);
void SetData(
const flutter::MethodCall<rapidjson::Document>& call,
std::unique_ptr<flutter::MethodResult<rapidjson::Document>> result);
};
#endif // EMBEDDER_PLATFORM_CHANNEL_H_