def GetResponseStructFromMethod(method): params_class = "%s_%s_ResponseParams" % (GetNameForElement(method.interface), GetNameForElement(method)) struct = mojom.Struct(params_class, module=method.interface.module) for param in method.response_parameters: struct.AddField("out%s" % GetNameForElement(param), param.kind, param.ordinal) struct.packed = pack.PackedStruct(struct) struct.bytes = pack.GetByteLayout(struct.packed) struct.versions = pack.GetVersionInfo(struct.packed) return struct
def _AddStructComputedData(exported, struct): struct.packed = pack.PackedStruct(struct) struct.bytes = pack.GetByteLayout(struct.packed) struct.versions = pack.GetVersionInfo(struct.packed) struct.exported = exported