public static int createSetKernelRequest(
     FlatBufferBuilder builder, int rom_id, int boot_blockdev) {
   builder.startObject(2);
   SetKernelRequest.addBootBlockdev(builder, boot_blockdev);
   SetKernelRequest.addRomId(builder, rom_id);
   return SetKernelRequest.endSetKernelRequest(builder);
 }
 public static int createFileCloseResponse(
     FlatBufferBuilder builder, boolean success, int error_msg) {
   builder.startObject(2);
   FileCloseResponse.addErrorMsg(builder, error_msg);
   FileCloseResponse.addSuccess(builder, success);
   return FileCloseResponse.endFileCloseResponse(builder);
 }
Esempio n. 3
0
 public int getField(FlatBufferBuilder builder) {
   int nameOffset = name == null ? -1 : builder.createString(name);
   int typeOffset = type.getType(builder);
   int[] childrenData = new int[children.size()];
   for (int i = 0; i < children.size(); i++) {
     childrenData[i] = children.get(i).getField(builder);
   }
   int childrenOffset = org.apache.arrow.flatbuf.Field.createChildrenVector(builder, childrenData);
   int[] buffersData = new int[typeLayout.getVectors().size()];
   for (int i = 0; i < buffersData.length; i++) {
     VectorLayout vectorLayout = typeLayout.getVectors().get(i);
     buffersData[i] = vectorLayout.writeTo(builder);
   }
   int layoutOffset = org.apache.arrow.flatbuf.Field.createLayoutVector(builder, buffersData);
   org.apache.arrow.flatbuf.Field.startField(builder);
   if (name != null) {
     org.apache.arrow.flatbuf.Field.addName(builder, nameOffset);
   }
   org.apache.arrow.flatbuf.Field.addNullable(builder, nullable);
   org.apache.arrow.flatbuf.Field.addTypeType(builder, type.getTypeID().getFlatbufID());
   org.apache.arrow.flatbuf.Field.addType(builder, typeOffset);
   org.apache.arrow.flatbuf.Field.addChildren(builder, childrenOffset);
   org.apache.arrow.flatbuf.Field.addLayout(builder, layoutOffset);
   return org.apache.arrow.flatbuf.Field.endField(builder);
 }
 public static int createPathChmodResponse(
     FlatBufferBuilder builder, boolean success, int error_msg) {
   builder.startObject(2);
   PathChmodResponse.addErrorMsg(builder, error_msg);
   PathChmodResponse.addSuccess(builder, success);
   return PathChmodResponse.endPathChmodResponse(builder);
 }
 public static int createPathSELinuxGetLabelRequest(
     FlatBufferBuilder builder, int pathOffset, boolean follow_symlinks) {
   builder.startObject(2);
   PathSELinuxGetLabelRequest.addPath(builder, pathOffset);
   PathSELinuxGetLabelRequest.addFollowSymlinks(builder, follow_symlinks);
   return PathSELinuxGetLabelRequest.endPathSELinuxGetLabelRequest(builder);
 }
Esempio n. 6
0
 public static int createStat(FlatBufferBuilder builder, int idOffset, long val, int count) {
   builder.startObject(3);
   Stat.addVal(builder, val);
   Stat.addId(builder, idOffset);
   Stat.addCount(builder, count);
   return Stat.endStat(builder);
 }
 public static int createFileReadResponse(
     FlatBufferBuilder builder, boolean success, int error_msg, long bytes_read, int data) {
   builder.startObject(4);
   FileReadResponse.addBytesRead(builder, bytes_read);
   FileReadResponse.addData(builder, data);
   FileReadResponse.addErrorMsg(builder, error_msg);
   FileReadResponse.addSuccess(builder, success);
   return FileReadResponse.endFileReadResponse(builder);
 }
 public static int createPersistedData(
     FlatBufferBuilder builder, int error, int lastupdated, int today, int tomorrow) {
   builder.startObject(4);
   PersistedData.addTomorrow(builder, tomorrow);
   PersistedData.addToday(builder, today);
   PersistedData.addLastupdated(builder, lastupdated);
   PersistedData.addError(builder, error);
   return PersistedData.endPersistedData(builder);
 }
 public static int createPathSELinuxGetLabelResponse(
     FlatBufferBuilder builder,
     boolean success,
     int error_msgOffset,
     int labelOffset,
     int errorOffset) {
   builder.startObject(4);
   PathSELinuxGetLabelResponse.addError(builder, errorOffset);
   PathSELinuxGetLabelResponse.addLabel(builder, labelOffset);
   PathSELinuxGetLabelResponse.addErrorMsg(builder, error_msgOffset);
   PathSELinuxGetLabelResponse.addSuccess(builder, success);
   return PathSELinuxGetLabelResponse.endPathSELinuxGetLabelResponse(builder);
 }
 public static void addError(FlatBufferBuilder builder, int errorOffset) {
   builder.addOffset(0, errorOffset, 0);
 }
 public static int endMbGetInstalledRomsResponse(FlatBufferBuilder builder) {
   int o = builder.endObject();
   return o;
 }
 public static void startRomsVector(FlatBufferBuilder builder, int numElems) {
   builder.startVector(4, numElems, 4);
 }
 public static int createRomsVector(FlatBufferBuilder builder, int[] data) {
   builder.startVector(4, data.length, 4);
   for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]);
   return builder.endVector();
 }
 public static void addRoms(FlatBufferBuilder builder, int romsOffset) {
   builder.addOffset(0, romsOffset, 0);
 }
 public static void startMbGetInstalledRomsResponse(FlatBufferBuilder builder) {
   builder.startObject(1);
 }
 public static int endPersistedData(FlatBufferBuilder builder) {
   return builder.endObject();
 }
 public static void addToday(FlatBufferBuilder builder, int todayOffset) {
   builder.addOffset(2, todayOffset, 0);
 }
 public static void addPath(FlatBufferBuilder builder, int pathOffset) {
   builder.addOffset(0, pathOffset, 0);
 }
 public static int endPathChmodResponse(FlatBufferBuilder builder) {
   int o = builder.endObject();
   return o;
 }
 public static void startPathChmodResponse(FlatBufferBuilder builder) {
   builder.startObject(2);
 }
 public static void addFollowSymlinks(FlatBufferBuilder builder, boolean followSymlinks) {
   builder.addBoolean(1, followSymlinks, false);
 }
 public static int endPathSELinuxGetLabelRequest(FlatBufferBuilder builder) {
   int o = builder.endObject();
   return o;
 }
 public static void startPersistedData(FlatBufferBuilder builder) {
   builder.startObject(4);
 }
 public static void startFileCloseResponse(FlatBufferBuilder builder) {
   builder.startObject(2);
 }
 public static void addLastupdated(FlatBufferBuilder builder, int lastupdatedOffset) {
   builder.addOffset(1, lastupdatedOffset, 0);
 }
 public static void addSuccess(FlatBufferBuilder builder, boolean success) {
   builder.addBoolean(0, success, false);
 }
 public static void addTomorrow(FlatBufferBuilder builder, int tomorrowOffset) {
   builder.addOffset(3, tomorrowOffset, 0);
 }
 public static int endFileCloseResponse(FlatBufferBuilder builder) {
   int o = builder.endObject();
   return o;
 }
 public static void finishPersistedDataBuffer(FlatBufferBuilder builder, int offset) {
   builder.finish(offset);
 }
 public static int createMbGetInstalledRomsResponse(FlatBufferBuilder builder, int romsOffset) {
   builder.startObject(1);
   MbGetInstalledRomsResponse.addRoms(builder, romsOffset);
   return MbGetInstalledRomsResponse.endMbGetInstalledRomsResponse(builder);
 }