mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-02 17:29:17 +02:00
Merge branch 'adb/new-rpc-bindings' into adb/integrated-videocalls
This commit is contained in:
commit
33f38889c1
3 changed files with 27 additions and 5 deletions
22
README.md
22
README.md
|
@ -23,6 +23,28 @@ subproject _deltachat-core-rust_:
|
|||
or later by `git submodule update --init --recursive`. If you do this in your
|
||||
home directory, this results in the folder `~/deltachat-android` which is just fine.
|
||||
|
||||
# Generate JSON-RPC bindings
|
||||
|
||||
To generate the JSON-RPC bindings (ex. `chat.delta.rpc.*` package)
|
||||
install the [dcrpcgen tool](https://github.com/chatmail/dcrpcgen)
|
||||
then generate the `schema.json` file:
|
||||
|
||||
```
|
||||
# install deltachat-rpc-server program:
|
||||
cargo install --path ./jni/deltachat-core-rust/deltachat-rpc-server
|
||||
# check the version of core matches:
|
||||
deltachat-rpc-server --version
|
||||
# generate the schema:
|
||||
deltachat-rpc-server --openrpc > schema.json
|
||||
```
|
||||
|
||||
then pass the schema file to the `dcrpcgen` tool to generate the
|
||||
code:
|
||||
|
||||
```
|
||||
dcrpcgen java --schema schema.json -o ./src/main/java/
|
||||
```
|
||||
|
||||
# Build Using Nix
|
||||
|
||||
The repository contains [Nix](https://nixos.org/) development environment
|
||||
|
|
|
@ -13,7 +13,7 @@ public class CallInfo {
|
|||
/**
|
||||
* Call state.
|
||||
* <p>
|
||||
* For example, if the call is accepted, active, cancelled, declined etc.
|
||||
* For example, if the call is accepted, active, canceled, declined etc.
|
||||
*/
|
||||
public CallState state;
|
||||
}
|
|
@ -8,7 +8,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo.Id;
|
|||
import com.fasterxml.jackson.annotation.JsonTypeInfo.As;
|
||||
|
||||
@JsonTypeInfo(use=Id.NAME, include=As.PROPERTY, property="kind")
|
||||
@JsonSubTypes({@Type(value = CallState.Alerting.class, name="Alerting"), @Type(value = CallState.Active.class, name="Active"), @Type(value = CallState.Completed.class, name="Completed"), @Type(value = CallState.Missed.class, name="Missed"), @Type(value = CallState.Declined.class, name="Declined"), @Type(value = CallState.Cancelled.class, name="Cancelled")})
|
||||
@JsonSubTypes({@Type(value = CallState.Alerting.class, name="Alerting"), @Type(value = CallState.Active.class, name="Active"), @Type(value = CallState.Completed.class, name="Completed"), @Type(value = CallState.Missed.class, name="Missed"), @Type(value = CallState.Declined.class, name="Declined"), @Type(value = CallState.Canceled.class, name="Canceled")})
|
||||
public abstract class CallState {
|
||||
|
||||
/**
|
||||
|
@ -38,11 +38,11 @@ public abstract class CallState {
|
|||
}
|
||||
|
||||
/**
|
||||
* Outgoing call that has been cancelled on our side before receiving a response.
|
||||
* Outgoing call that has been canceled on our side before receiving a response.
|
||||
* <p>
|
||||
* Incoming calls cannot be cancelled, on the receiver side cancelled calls usually result in missed calls.
|
||||
* Incoming calls cannot be canceled, on the receiver side canceled calls usually result in missed calls.
|
||||
*/
|
||||
public static class Cancelled extends CallState {
|
||||
public static class Canceled extends CallState {
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue