@Override
 public void parse(BserValues values) throws IOException {
   this.w = values.getInt(1);
   this.h = values.getInt(2);
   if (values.hasRemaining()) {
     setUnmappedObjects(values.buildRemaining());
   }
 }
Ejemplo n.º 2
0
 @Override
 public void parse(BserValues values) throws IOException {
   this.command = values.getString(1);
   this.args = values.getString(2);
   if (values.hasRemaining()) {
     setUnmappedObjects(values.buildRemaining());
   }
 }
Ejemplo n.º 3
0
 @Override
 public void parse(BserValues values) throws IOException {
   List<ApiMapValueItem> _items = new ArrayList<ApiMapValueItem>();
   for (int i = 0; i < values.getRepeatedCount(1); i++) {
     _items.add(new ApiMapValueItem());
   }
   this.items = values.getRepeatedObj(1, _items);
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.nextOffset = values.optBytes(1);
   this.limit = values.getInt(2);
   this.optimizations = new ArrayList<ApiUpdateOptimization>();
   for (int b : values.getRepeatedInt(3)) {
     optimizations.add(ApiUpdateOptimization.parse(b));
   }
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.groupPeer = values.getObj(1, new ApiGroupOutPeer());
   this.rid = values.getLong(2);
   this.optimizations = new ArrayList<ApiUpdateOptimization>();
   for (int b : values.getRepeatedInt(3)) {
     optimizations.add(ApiUpdateOptimization.parse(b));
   }
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.peer = values.getObj(1, new ApiPeer());
   this.rid = values.getLong(2);
   List<ApiMessageReaction> _reactions = new ArrayList<ApiMessageReaction>();
   for (int i = 0; i < values.getRepeatedCount(3); i++) {
     _reactions.add(new ApiMessageReaction());
   }
   this.reactions = values.getRepeatedObj(3, _reactions);
 }
 public static ApiTextMessageEx fromBytes(byte[] src) throws IOException {
   BserValues values = new BserValues(BserParser.deserialize(new DataInput(src, 0, src.length)));
   int key = values.getInt(1);
   byte[] content = values.getBytes(2);
   switch (key) {
     case 1:
       return Bser.parse(new ApiTextExMarkdown(), content);
     case 2:
       return Bser.parse(new ApiTextModernMessage(), content);
     case 3:
       return Bser.parse(new ApiTextCommand(), content);
     default:
       return new ApiTextMessageExUnsupported(key, content);
   }
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.bannerId = values.getInt(1);
   this.viewDuration = values.getInt(2);
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.uid = values.getInt(1);
   this.accessHash = values.getLong(2);
 }
Ejemplo n.º 10
0
 @Override
 public void parse(BserValues values) throws IOException {
   this.text = values.getString(1);
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.groupId = values.getInt(1);
   this.ext = values.optObj(2, new ApiMapValue());
 }
Ejemplo n.º 12
0
 @Override
 public void parse(BserValues values) throws IOException {
   this.peer = values.getObj(1, new ApiOutPeer());
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.settings = values.getObj(1, new ApiAdminSettings());
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.timeout = values.getInt(1);
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.peer = values.getObj(1, new ApiPeer());
   this.startDate = values.getLong(2);
 }
 @Override
 public void parse(BserValues values) throws IOException {
   this.color = ApiColors.parse(values.getInt(1));
 }