public class CCProto
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CCProto.PictureResult |
Modifier and Type | Field and Description |
---|---|
static int |
sCCC_HASH |
static int |
sCCC_INIT |
static int |
sCCC_LOGIN |
static int |
sCCC_PICTURE |
Constructor and Description |
---|
CCProto(ScrapingSession session) |
Modifier and Type | Method and Description |
---|---|
int |
balance(java.lang.String[] balance) |
int |
close() |
int |
login(java.lang.String hostname,
int port,
java.lang.String login,
java.lang.String pwd) |
int |
picture_bad2(int major_id,
int minor_id) |
int |
picture2(byte[] pict,
int[] pict_to,
int[] pict_type,
java.lang.String[] text,
int[] major_id,
int[] minor_id)
say "thanks" to Java incapability to pass values by reference in order to use them as multiple returns
all arrays[] are used as workarond to get values out of the function, really
|
CCProto.PictureResult |
picture2(byte[] pict,
int timeout,
int type)
Receive back a result object that includes all the details in a format trivial to use
in other Java code, while passing only and exactly what's needed.
|
public static final int sCCC_INIT
public static final int sCCC_LOGIN
public static final int sCCC_HASH
public static final int sCCC_PICTURE
public CCProto(ScrapingSession session)
public int login(java.lang.String hostname, int port, @NotNull java.lang.String login, @NotNull java.lang.String pwd)
@NotNull public CCProto.PictureResult picture2(byte[] pict, int timeout, int type)
pict
- The bytes of the picture to solvetimeout
- How long the solution should take at mosttype
- The type of the picturepublic int picture2(byte[] pict, int[] pict_to, int[] pict_type, java.lang.String[] text, @Nullable int[] major_id, @Nullable int[] minor_id)
public int picture_bad2(int major_id, int minor_id)
public int balance(java.lang.String[] balance)
public int close()