mirror of
https://github.com/fabianonline/telegram_backup.git
synced 2025-06-30 04:16:26 +00:00
First commit: Just a collection of library sources from Github. Compiles, but doesn't work.
This commit is contained in:
70
src/org/telegram/mtproto/tl/MTNeedResendMessage.java
Normal file
70
src/org/telegram/mtproto/tl/MTNeedResendMessage.java
Normal file
@ -0,0 +1,70 @@
|
||||
package org.telegram.mtproto.tl;
|
||||
|
||||
import org.telegram.tl.TLContext;
|
||||
import org.telegram.tl.TLLongVector;
|
||||
import org.telegram.tl.TLObject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Collections;
|
||||
|
||||
import static org.telegram.tl.StreamingUtils.readTLLongVector;
|
||||
import static org.telegram.tl.StreamingUtils.writeTLVector;
|
||||
|
||||
/**
|
||||
* Created with IntelliJ IDEA.
|
||||
* User: ex3ndr
|
||||
* Date: 07.11.13
|
||||
* Time: 8:50
|
||||
*/
|
||||
public class MTNeedResendMessage extends TLObject {
|
||||
|
||||
public static final int CLASS_ID = 0x7d861a08;
|
||||
|
||||
private TLLongVector messages;
|
||||
|
||||
public MTNeedResendMessage(TLLongVector messages) {
|
||||
this.messages = messages;
|
||||
}
|
||||
|
||||
public MTNeedResendMessage() {
|
||||
this.messages = new TLLongVector();
|
||||
}
|
||||
|
||||
public MTNeedResendMessage(long[] msgIds) {
|
||||
this.messages = new TLLongVector();
|
||||
for (long id : msgIds) {
|
||||
this.messages.add(id);
|
||||
}
|
||||
}
|
||||
|
||||
public MTNeedResendMessage(Long[] msgIds) {
|
||||
this.messages = new TLLongVector();
|
||||
Collections.addAll(this.messages, msgIds);
|
||||
}
|
||||
|
||||
public TLLongVector getMessages() {
|
||||
return messages;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getClassId() {
|
||||
return CLASS_ID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serializeBody(OutputStream stream) throws IOException {
|
||||
writeTLVector(messages, stream);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeBody(InputStream stream, TLContext context) throws IOException {
|
||||
messages = readTLLongVector(stream, context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "msg_resend_req#7d861a08";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user