Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
2f6bcdeb
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
2f6bcdeb
编写于
5月 12, 2020
作者:
R
Robert Ancell
提交者:
GitHub
5月 12, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add FlStandardMessageCodec (#18213)
上级
b1622c2b
变更
7
展开全部
隐藏空白更改
内联
并排
Showing
7 changed file
with
1727 addition
and
0 deletion
+1727
-0
ci/licenses_golden/licenses_flutter
ci/licenses_golden/licenses_flutter
+4
-0
shell/platform/linux/BUILD.gn
shell/platform/linux/BUILD.gn
+3
-0
shell/platform/linux/fl_standard_message_codec.cc
shell/platform/linux/fl_standard_message_codec.cc
+563
-0
shell/platform/linux/fl_standard_message_codec_private.h
shell/platform/linux/fl_standard_message_codec_private.h
+77
-0
shell/platform/linux/fl_standard_message_codec_test.cc
shell/platform/linux/fl_standard_message_codec_test.cc
+1032
-0
shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h
...rm/linux/public/flutter_linux/fl_standard_message_codec.h
+47
-0
shell/platform/linux/public/flutter_linux/flutter_linux.h
shell/platform/linux/public/flutter_linux/flutter_linux.h
+1
-0
未找到文件。
ci/licenses_golden/licenses_flutter
浏览文件 @
2f6bcdeb
...
...
@@ -1199,6 +1199,9 @@ FILE: ../../../flutter/shell/platform/linux/fl_renderer.cc
FILE: ../../../flutter/shell/platform/linux/fl_renderer.h
FILE: ../../../flutter/shell/platform/linux/fl_renderer_x11.cc
FILE: ../../../flutter/shell/platform/linux/fl_renderer_x11.h
FILE: ../../../flutter/shell/platform/linux/fl_standard_message_codec.cc
FILE: ../../../flutter/shell/platform/linux/fl_standard_message_codec_private.h
FILE: ../../../flutter/shell/platform/linux/fl_standard_message_codec_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_string_codec.cc
FILE: ../../../flutter/shell/platform/linux/fl_string_codec_test.cc
FILE: ../../../flutter/shell/platform/linux/fl_value.cc
...
...
@@ -1209,6 +1212,7 @@ FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_binary_messe
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_dart_project.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_engine.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_message_codec.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_string_codec.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_value.h
FILE: ../../../flutter/shell/platform/linux/public/flutter_linux/fl_view.h
...
...
shell/platform/linux/BUILD.gn
浏览文件 @
2f6bcdeb
...
...
@@ -49,6 +49,7 @@ _public_headers = [
"public/flutter_linux/fl_dart_project.h",
"public/flutter_linux/fl_engine.h",
"public/flutter_linux/fl_message_codec.h",
"public/flutter_linux/fl_standard_message_codec.h",
"public/flutter_linux/fl_string_codec.h",
"public/flutter_linux/fl_value.h",
"public/flutter_linux/fl_view.h",
...
...
@@ -70,6 +71,7 @@ source_set("flutter_linux") {
"fl_message_codec.cc",
"fl_renderer.cc",
"fl_renderer_x11.cc",
"fl_standard_message_codec.cc",
"fl_string_codec.cc",
"fl_value.cc",
"fl_view.cc",
...
...
@@ -100,6 +102,7 @@ executable("flutter_linux_unittests") {
"fl_binary_codec_test.cc",
"fl_dart_project_test.cc",
"fl_message_codec_test.cc",
"fl_standard_message_codec_test.cc",
"fl_string_codec_test.cc",
"fl_value_test.cc",
"testing/fl_test.cc",
...
...
shell/platform/linux/fl_standard_message_codec.cc
0 → 100644
浏览文件 @
2f6bcdeb
此差异已折叠。
点击以展开。
shell/platform/linux/fl_standard_message_codec_private.h
0 → 100644
浏览文件 @
2f6bcdeb
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_PRIVATE_H_
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_PRIVATE_H_
#include "flutter/shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h"
G_BEGIN_DECLS
/**
* fl_standard_message_codec_write_size:
* @codec: a #FlStandardMessageCodec
* @buffer: buffer to write into
* @size: size value to write
*
* Writes a size field in Flutter Standard encoding.
*/
void
fl_standard_message_codec_write_size
(
FlStandardMessageCodec
*
codec
,
GByteArray
*
buffer
,
uint32_t
size
);
/**
* fl_standard_message_codec_read_size:
* @codec: a #FlStandardMessageCodec
* @buffer: buffer to read from
* @offset: (inout): read position in @buffer
* @value: location to read size
* @error: (allow-none): #GError location to store the error occurring, or %NULL
*
* Reads a size field in Flutter Standard encoding.
*
* Returns: %TRUE on success.
*/
gboolean
fl_standard_message_codec_read_size
(
FlStandardMessageCodec
*
codec
,
GBytes
*
buffer
,
size_t
*
offset
,
uint32_t
*
value
,
GError
**
error
);
/**
* fl_standard_message_codec_write_value:
* @codec: a #FlStandardMessageCodec
* @buffer: buffer to write into
* @value: (allow-none): value to write
* @error: (allow-none): #GError location to store the error occurring, or %NULL
*
* Writes a #FlValue in Flutter Standard encoding.
*
* Returns: %TRUE on success.
*/
gboolean
fl_standard_message_codec_write_value
(
FlStandardMessageCodec
*
codec
,
GByteArray
*
buffer
,
FlValue
*
value
,
GError
**
error
);
/**
* fl_standard_message_codec_read_value:
* @codec: a #FlStandardMessageCodec
* @buffer: buffer to read from
* @offset: (inout): read position in @buffer
* @value: location to read size
* @error: (allow-none): #GError location to store the error occurring, or %NULL
*
* Reads a #FlValue in Flutter Standard encoding.
*
* Returns: a new #FlValue or %NULL on error.
*/
FlValue
*
fl_standard_message_codec_read_value
(
FlStandardMessageCodec
*
codec
,
GBytes
*
buffer
,
size_t
*
offset
,
GError
**
error
);
G_END_DECLS
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_PRIVATE_H_
shell/platform/linux/fl_standard_message_codec_test.cc
0 → 100644
浏览文件 @
2f6bcdeb
此差异已折叠。
点击以展开。
shell/platform/linux/public/flutter_linux/fl_standard_message_codec.h
0 → 100644
浏览文件 @
2f6bcdeb
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_H_
#define FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_H_
#if !defined(__FLUTTER_LINUX_INSIDE__) && !defined(FLUTTER_LINUX_COMPILATION)
#error "Only <flutter_linux/flutter_linux.h> can be included directly."
#endif
#include "fl_message_codec.h"
G_BEGIN_DECLS
G_DECLARE_FINAL_TYPE
(
FlStandardMessageCodec
,
fl_standard_message_codec
,
FL
,
STANDARD_CODEC
,
FlMessageCodec
)
/**
* FlStandardMessageCodec:
*
* #FlStandardMessageCodec is an #FlMessageCodec that implements the Flutter
* standard message encoding. This encodes and decodes #FlValue of type
* #FL_VALUE_TYPE_NULL, #FL_VALUE_TYPE_BOOL, #FL_VALUE_TYPE_INT,
* #FL_VALUE_TYPE_FLOAT, #FL_VALUE_TYPE_STRING, #FL_VALUE_TYPE_UINT8_LIST,
* #FL_VALUE_TYPE_INT32_LIST, #FL_VALUE_TYPE_INT64_LIST,
* #FL_VALUE_TYPE_FLOAT_LIST, #FL_VALUE_TYPE_LIST, and #FL_VALUE_TYPE_MAP
*
* #FlStandardMessageCodec matches the StandardCodec class in the Flutter
* services library.
*/
/*
* fl_standard_message_codec_new:
*
* Creates a #FlStandardMessageCodec.
*
* Returns: a new #FlStandardMessageCodec
*/
FlStandardMessageCodec
*
fl_standard_message_codec_new
();
G_END_DECLS
#endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_STANDARD_MESSAGE_CODEC_H_
shell/platform/linux/public/flutter_linux/flutter_linux.h
浏览文件 @
2f6bcdeb
...
...
@@ -12,6 +12,7 @@
#include <flutter_linux/fl_dart_project.h>
#include <flutter_linux/fl_engine.h>
#include <flutter_linux/fl_message_codec.h>
#include <flutter_linux/fl_standard_message_codec.h>
#include <flutter_linux/fl_string_codec.h>
#include <flutter_linux/fl_value.h>
#include <flutter_linux/fl_view.h>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录