mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-05 19:42:17 +02:00
getBookHash API method (not implemented yet)
This commit is contained in:
parent
765c465302
commit
a63666d224
4 changed files with 13 additions and 0 deletions
|
@ -22,6 +22,7 @@ public interface Api {
|
||||||
//List<String> getBookAuthors() throws ApiException;
|
//List<String> getBookAuthors() throws ApiException;
|
||||||
List<String> getBookTags() throws ApiException;
|
List<String> getBookTags() throws ApiException;
|
||||||
String getBookFileName() throws ApiException;
|
String getBookFileName() throws ApiException;
|
||||||
|
String getBookHash() throws ApiException;
|
||||||
|
|
||||||
// text information
|
// text information
|
||||||
int getParagraphsNumber() throws ApiException;
|
int getParagraphsNumber() throws ApiException;
|
||||||
|
|
|
@ -217,6 +217,10 @@ public class ApiClientImplementation implements ServiceConnection, Api, ApiMetho
|
||||||
return requestString(GET_BOOK_FILE_NAME, EMPTY_PARAMETERS);
|
return requestString(GET_BOOK_FILE_NAME, EMPTY_PARAMETERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBookHash() throws ApiException {
|
||||||
|
return requestString(GET_BOOK_HASH, EMPTY_PARAMETERS);
|
||||||
|
}
|
||||||
|
|
||||||
public TextPosition getPageStart() throws ApiException {
|
public TextPosition getPageStart() throws ApiException {
|
||||||
return requestTextPosition(GET_PAGE_START, EMPTY_PARAMETERS);
|
return requestTextPosition(GET_PAGE_START, EMPTY_PARAMETERS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,6 +26,7 @@ interface ApiMethods {
|
||||||
int GET_BOOK_AUTHORS = 503;
|
int GET_BOOK_AUTHORS = 503;
|
||||||
int GET_BOOK_TAGS = 504;
|
int GET_BOOK_TAGS = 504;
|
||||||
int GET_BOOK_FILE_NAME = 505;
|
int GET_BOOK_FILE_NAME = 505;
|
||||||
|
int GET_BOOK_HASH = 506;
|
||||||
|
|
||||||
// text information
|
// text information
|
||||||
int GET_PARAGRAPHS_NUMBER = 601;
|
int GET_PARAGRAPHS_NUMBER = 601;
|
||||||
|
|
|
@ -72,6 +72,8 @@ public class ApiServerImplementation extends ApiInterface.Stub implements Api, A
|
||||||
return ApiObject.envelope(getBookTitle());
|
return ApiObject.envelope(getBookTitle());
|
||||||
case GET_BOOK_FILE_NAME:
|
case GET_BOOK_FILE_NAME:
|
||||||
return ApiObject.envelope(getBookFileName());
|
return ApiObject.envelope(getBookFileName());
|
||||||
|
case GET_BOOK_HASH:
|
||||||
|
return ApiObject.envelope(getBookHash());
|
||||||
case GET_PARAGRAPHS_NUMBER:
|
case GET_PARAGRAPHS_NUMBER:
|
||||||
return ApiObject.envelope(getParagraphsNumber());
|
return ApiObject.envelope(getParagraphsNumber());
|
||||||
case GET_ELEMENTS_NUMBER:
|
case GET_ELEMENTS_NUMBER:
|
||||||
|
@ -183,6 +185,11 @@ public class ApiServerImplementation extends ApiInterface.Stub implements Api, A
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getBookHash() {
|
||||||
|
// TODO: implement
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
// page information
|
// page information
|
||||||
public TextPosition getPageStart() {
|
public TextPosition getPageStart() {
|
||||||
return getTextPosition(myReader.getTextView().getStartCursor());
|
return getTextPosition(myReader.getTextView().getStartCursor());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue