зеркало из https://github.com/mozilla/pluotsorbet.git
Implement DataDecoder::listHasMoreItems
This commit is contained in:
Родитель
aca9c3e09c
Коммит
24dd3e4590
|
@ -13,9 +13,7 @@ public class DataDecoder {
|
|||
|
||||
public native int getType() throws IOException;
|
||||
|
||||
public boolean listHasMoreItems() throws IOException {
|
||||
throw new RuntimeException("DataDecoder::listHasMoreItems() not implemented");
|
||||
}
|
||||
public native boolean listHasMoreItems() throws IOException;
|
||||
|
||||
public native void getStart(int tag) throws IOException;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
'use strict';
|
||||
|
||||
var DataType = {
|
||||
BYTE: 2,
|
||||
USHORT: 5,
|
||||
ULONG: 7,
|
||||
STRING: 10,
|
||||
|
@ -87,6 +88,10 @@ DataDecoder.prototype.getTag = function() {
|
|||
return this.data[0].tag;
|
||||
}
|
||||
|
||||
DataDecoder.prototype.getType = function() {
|
||||
return this.data[0].type || -1;
|
||||
}
|
||||
|
||||
Native["com/nokia/mid/s40/codec/DataEncoder.init.()V"] = function(ctx, stack) {
|
||||
var _this = stack.pop();
|
||||
_this.encoder = new DataEncoder();
|
||||
|
@ -188,3 +193,8 @@ Native["com/nokia/mid/s40/codec/DataDecoder.getType.()I"] = function(ctx, stack)
|
|||
}
|
||||
stack.push(tag);
|
||||
}
|
||||
|
||||
Native["com/nokia/mid/s40/codec/DataDecoder.listHasMoreItems.()Z"] = function(ctx, stack) {
|
||||
var _this = stack.pop();
|
||||
stack.push((_this.decoder.getType() != DataEncoder.END) ? 1 : 0);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче