Skip to content

Commit

Permalink
Deprecate JNI meshms interface
Browse files Browse the repository at this point in the history
  • Loading branch information
lakeman committed Jun 25, 2014
1 parent 2cdd2ce commit 82b13ca
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions java/org/servalproject/servaldna/ServalDCommand.java
Expand Up @@ -559,6 +559,7 @@ public static int idPeers(IJniResults results) throws ServalDFailureException {
return command(results, "id", "peers");
}

@Deprecated
public static class Conversation extends JniResult{
public long id;
public SubscriberId recipient;
Expand Down Expand Up @@ -593,6 +594,7 @@ public void putLong(long value) {
}
}

@Deprecated
public static int listConversations(AsyncResult<Conversation> result, final SubscriberId sender, int offset, int numRows) throws ServalDFailureException {
return listConversations(new JniResultList<Conversation>(result) {
@Override
Expand All @@ -602,11 +604,13 @@ public Conversation create() {
}, sender, offset, numRows);
}

@Deprecated
public static int listConversations(IJniResults callback, final SubscriberId sender, int offset, int numRows) throws ServalDFailureException {
return command(callback, "meshms", "list", "conversations",
sender.toHex(), ""+offset, ""+numRows);
}

@Deprecated
public static class Message extends JniResult{
public long id;
public long offset;
Expand All @@ -630,6 +634,7 @@ public void putLong(long value) {
}
}

@Deprecated
public static int listMessages(AsyncResult<Message> result, final SubscriberId sender, final SubscriberId recipient) throws ServalDFailureException {
return listMessages(new JniResultList<Message>(result) {
@Override
Expand All @@ -639,22 +644,26 @@ public Message create() {
}, sender, recipient);
}

@Deprecated
public static int listMessages(IJniResults callback, final SubscriberId sender, final SubscriberId recipient) throws ServalDFailureException {
return ServalDCommand.command(callback, "meshms", "list", "messages",
sender.toHex(), recipient.toHex());
}

@Deprecated
public static void sendMessage(final SubscriberId sender, final SubscriberId recipient, String message) throws ServalDFailureException {
command("meshms", "send", "message",
sender.toHex(), recipient.toHex(),
message);
}

@Deprecated
public static void readMessage(final SubscriberId sender, final SubscriberId recipient) throws ServalDFailureException {
command("meshms", "read", "messages",
sender.toHex(), recipient.toHex());
}

@Deprecated
public static void readMessage(final SubscriberId sender, final SubscriberId recipient, long offset) throws ServalDFailureException {
command("meshms", "read", "messages",
sender.toHex(), recipient.toHex(),
Expand Down

0 comments on commit 82b13ca

Please sign in to comment.