1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 17:59:33 +02:00

getBookTitle method has been implemented

This commit is contained in:
Nikolay Pultsin 2011-06-19 01:45:15 +01:00
parent d2dfafccf8
commit 37924e0072

View file

@ -37,7 +37,13 @@ public class ApiImplementation extends ApiInterface.Stub implements ApiMethods {
ZLibrary.Instance().getVersionName()
);
case GET_BOOK_LANGUAGE:
return ApiObject.envelope(getBookLanguage());
return ApiObject.envelope(
myReader.Model.Book.getLanguage()
);
case GET_BOOK_TITLE:
return ApiObject.envelope(
myReader.Model.Book.getTitle()
);
case GET_PARAGRAPHS_NUMBER:
return ApiObject.envelope(getParagraphsNumber());
case GET_ELEMENTS_NUMBER:
@ -69,10 +75,6 @@ public class ApiImplementation extends ApiInterface.Stub implements ApiMethods {
}
}
private String getBookLanguage() {
return myReader.Model.Book.getLanguage();
}
private TextPosition getTextPosition(ZLTextWordCursor cursor) {
return new TextPosition(
cursor.getParagraphIndex(),