Impl getDbNames
This commit is contained in:
parent
55d213692b
commit
d20e070596
@ -1,5 +1,6 @@
|
|||||||
package com.iamteer;
|
package com.iamteer;
|
||||||
|
|
||||||
|
import com.iamteer.Wcf.DbNames;
|
||||||
import com.iamteer.Wcf.Functions;
|
import com.iamteer.Wcf.Functions;
|
||||||
import com.iamteer.Wcf.Request;
|
import com.iamteer.Wcf.Request;
|
||||||
import com.iamteer.Wcf.Response;
|
import com.iamteer.Wcf.Response;
|
||||||
@ -91,6 +92,16 @@ public class Client {
|
|||||||
return Wcf.RpcContacts.newBuilder().build().getContactsList();
|
return Wcf.RpcContacts.newBuilder().build().getContactsList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getDbNames() {
|
||||||
|
Request req = new Request.Builder().setFuncValue(Functions.FUNC_GET_DB_NAMES_VALUE).build();
|
||||||
|
Response rsp = sendCmd(req);
|
||||||
|
if (rsp != null) {
|
||||||
|
return rsp.getDbs().getNamesList();
|
||||||
|
}
|
||||||
|
|
||||||
|
return Wcf.DbNames.newBuilder().build().getNamesList();
|
||||||
|
}
|
||||||
|
|
||||||
public void waitMs(int ms) {
|
public void waitMs(int ms) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(ms);
|
Thread.sleep(ms);
|
||||||
|
@ -14,5 +14,6 @@ public class Main {
|
|||||||
logger.info("wxid: {}", client.getSelfWxid());
|
logger.info("wxid: {}", client.getSelfWxid());
|
||||||
logger.info("message types: {}", client.getMsgTypes());
|
logger.info("message types: {}", client.getMsgTypes());
|
||||||
client.printContacts(client.getContacts());
|
client.printContacts(client.getContacts());
|
||||||
|
logger.info("dbs: {}", client.getDbNames());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user