示例#1
0
class Value(object):
    __metaclass__ = _reflection.MojoUnionType
    DESCRIPTOR = {
        'fields': [
            _descriptor.SingleFieldGroup(
                'literal_value', _descriptor.UnionType(lambda: LiteralValue),
                0, 0),
            _descriptor.SingleFieldGroup(
                'constant_reference',
                _descriptor.StructType(lambda: ConstantReference), 1, 0),
            _descriptor.SingleFieldGroup(
                'enum_value_reference',
                _descriptor.StructType(lambda: EnumValueReference), 2, 0),
            _descriptor.SingleFieldGroup('builtin_value',
                                         _descriptor.TYPE_INT32, 3, 0),
        ],
    }
示例#2
0
class ArrayType(object):
    __metaclass__ = _reflection.MojoStructType
    DESCRIPTOR = {
        'fields': [
            _descriptor.BooleanGroup([
                _descriptor.FieldDescriptor('nullable', _descriptor.TYPE_BOOL,
                                            0, 0)
            ]),
            _descriptor.SingleFieldGroup('fixed_length',
                                         _descriptor.TYPE_INT32,
                                         1,
                                         0,
                                         default_value=-1),
            _descriptor.SingleFieldGroup('element_type',
                                         _descriptor.UnionType(lambda: Type),
                                         2, 0),
        ],
    }
示例#3
0
class FidlFileGraph(object):
    __metaclass__ = _reflection.MojoStructType
    DESCRIPTOR = {
        'fields': [
            _descriptor.SingleFieldGroup(
                'files',
                _descriptor.MapType(_descriptor.TYPE_STRING,
                                    _descriptor.StructType(lambda: FidlFile)),
                0, 0),
            _descriptor.SingleFieldGroup(
                'resolved_types',
                _descriptor.MapType(
                    _descriptor.TYPE_STRING,
                    _descriptor.UnionType(
                        lambda: fidl_types_fidl.UserDefinedType)), 1, 0),
            _descriptor.SingleFieldGroup(
                'resolved_constants',
                _descriptor.MapType(
                    _descriptor.TYPE_STRING,
                    _descriptor.StructType(
                        lambda: fidl_types_fidl.DeclaredConstant)), 2, 0),
        ],
    }
示例#4
0
class MojomFileGraph(object):
  __metaclass__ = _reflection.MojoStructType
  DESCRIPTOR = {
    'fields': [
      _descriptor.SingleFieldGroup('files', _descriptor.MapType(_descriptor.TYPE_STRING, _descriptor.StructType(lambda: MojomFile)), 0, 0),
      _descriptor.SingleFieldGroup('resolved_types', _descriptor.MapType(_descriptor.TYPE_STRING, _descriptor.UnionType(lambda: mojom_types_mojom.UserDefinedType)), 1, 0),
      _descriptor.SingleFieldGroup('resolved_values', _descriptor.MapType(_descriptor.TYPE_STRING, _descriptor.UnionType(lambda: mojom_types_mojom.UserDefinedValue)), 2, 0),
    ],
  }
示例#5
0
class ConformanceTestInterface(object):
    __metaclass__ = _interface_reflection.MojoInterfaceType
    DESCRIPTOR = {
        'fully_qualified_name':
        None,
        'version':
        0,
        'methods': [
            {
                'name': 'Method0',
                'ordinal': 0,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup('param0',
                                                     _descriptor.TYPE_FLOAT, 0,
                                                     0),
                    ],
                },
            },
            {
                'name': 'Method1',
                'ordinal': 1,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0', _descriptor.StructType(lambda: StructA),
                            0, 0),
                    ],
                },
            },
            {
                'name': 'Method2',
                'ordinal': 2,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0', _descriptor.StructType(lambda: StructB),
                            0, 0),
                        _descriptor.SingleFieldGroup(
                            'param1', _descriptor.StructType(lambda: StructA),
                            1, 0),
                    ],
                },
            },
            {
                'name': 'Method3',
                'ordinal': 3,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0', _descriptor.BooleanArrayType(), 0, 0),
                    ],
                },
            },
            {
                'name': 'Method4',
                'ordinal': 4,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0', _descriptor.StructType(lambda: StructC),
                            0, 0),
                        _descriptor.SingleFieldGroup(
                            'param1', _descriptor.NativeArrayType('B'), 1, 0),
                    ],
                },
            },
            {
                'name': 'Method5',
                'ordinal': 5,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0', _descriptor.StructType(lambda: StructE),
                            0, 0),
                        _descriptor.SingleFieldGroup('param1',
                                                     _descriptor.TYPE_HANDLE,
                                                     1, 0),
                    ],
                },
            },
            {
                'name': 'Method6',
                'ordinal': 6,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0',
                            _descriptor.GenericArrayType(
                                _descriptor.NativeArrayType('B')), 0, 0),
                    ],
                },
            },
            {
                'name': 'Method7',
                'ordinal': 7,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0', _descriptor.StructType(lambda: StructF),
                            0, 0),
                        _descriptor.SingleFieldGroup(
                            'param1',
                            _descriptor.GenericArrayType(
                                _descriptor.NativeArrayType('B',
                                                            nullable=True,
                                                            length=3),
                                length=2), 1, 0),
                    ],
                },
            },
            {
                'name': 'Method8',
                'ordinal': 8,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0',
                            _descriptor.GenericArrayType(
                                _descriptor.GenericArrayType(
                                    _descriptor.TYPE_STRING, nullable=True)),
                            0, 0),
                    ],
                },
            },
            {
                'name': 'Method9',
                'ordinal': 9,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0',
                            _descriptor.GenericArrayType(
                                _descriptor.GenericArrayType(
                                    _descriptor.TYPE_NULLABLE_HANDLE),
                                nullable=True), 0, 0),
                    ],
                },
            },
            {
                'name': 'Method10',
                'ordinal': 10,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0',
                            _descriptor.MapType(_descriptor.TYPE_STRING,
                                                _descriptor.TYPE_UINT8), 0, 0),
                    ],
                },
            },
            {
                'name': 'Method11',
                'ordinal': 11,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0', _descriptor.StructType(lambda: StructG),
                            0, 0),
                    ],
                },
            },
            {
                'name': 'Method12',
                'ordinal': 12,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup('param0',
                                                     _descriptor.TYPE_FLOAT, 0,
                                                     0),
                    ],
                },
                'responses': {
                    'fields': [
                        _descriptor.SingleFieldGroup('param0',
                                                     _descriptor.TYPE_FLOAT, 0,
                                                     0),
                    ],
                },
            },
            {
                'name': 'Method13',
                'ordinal': 13,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0',
                            _descriptor.InterfaceType(lambda: InterfaceA,
                                                      nullable=True), 0, 0),
                        _descriptor.SingleFieldGroup('param1',
                                                     _descriptor.TYPE_UINT32,
                                                     1, 0),
                        _descriptor.SingleFieldGroup(
                            'param2',
                            _descriptor.InterfaceType(lambda: InterfaceA,
                                                      nullable=True), 2, 0),
                    ],
                },
            },
            {
                'name': 'Method14',
                'ordinal': 14,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0', _descriptor.UnionType(lambda: UnionA), 0,
                            0),
                    ],
                },
            },
            {
                'name': 'Method15',
                'ordinal': 15,
                'parameters': {
                    'fields': [
                        _descriptor.SingleFieldGroup(
                            'param0', _descriptor.StructType(lambda: StructH),
                            0, 0),
                    ],
                },
            },
        ],
    }
示例#6
0
class RuntimeTypeInfo(object):
  __metaclass__ = _reflection.MojoStructType
  DESCRIPTOR = {
    'fields': [
      _descriptor.SingleFieldGroup('services_by_name', _descriptor.MapType(_descriptor.TYPE_STRING, _descriptor.StructType(lambda: ServiceTypeInfo)), 0, 0),
      _descriptor.SingleFieldGroup('type_map', _descriptor.MapType(_descriptor.TYPE_STRING, _descriptor.UnionType(lambda: UserDefinedType)), 1, 0),
    ],
  }