Beispiel #1
0
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
Beispiel #2
0
 def _AddStructComputedData(exported, struct):
     struct.packed = pack.PackedStruct(struct)
     struct.bytes = pack.GetByteLayout(struct.packed)
     struct.versions = pack.GetVersionInfo(struct.packed)
     struct.exported = exported