Invitation API and two (untested) implementations.

This commit is contained in:
akwizgran
2011-10-27 17:52:03 +01:00
parent 59485fe392
commit 48d638746c
26 changed files with 834 additions and 251 deletions

View File

@@ -23,4 +23,28 @@ public interface BatchPlugin extends Plugin {
* Returns null if a writer could not be created.
*/
BatchTransportWriter createWriter(ContactId c);
/**
* Starts the invitation process from the inviter's side. Returns null if
* no connection can be established within the given timeout.
*/
BatchTransportWriter sendInvitation(int code, long timeout);
/**
* Starts the invitation process from the invitee's side. Returns null if
* no connection can be established within the given timeout.
*/
BatchTransportReader acceptInvitation(int code, long timeout);
/**
* Continues the invitation process from the invitee's side. Returns null
* if no connection can be established within the given timeout.
*/
BatchTransportWriter sendInvitationResponse(int code, long timeout);
/**
* Continues the invitation process from the inviter's side. Returns null
* if no connection can be established within the given timeout.
*/
BatchTransportReader acceptInvitationResponse(int code, long timeout);
}

View File

@@ -15,4 +15,16 @@ public interface StreamPlugin extends Plugin {
* Returns null if a connection could not be created.
*/
StreamTransportConnection createConnection(ContactId c);
/**
* Starts the invitation process from the inviter's side. Returns null if
* no connection can be established within the given timeout.
*/
StreamTransportConnection sendInvitation(int code, long timeout);
/**
* Starts the invitation process from the invitee's side. Returns null if
* no connection can be established within the given timeout.
*/
StreamTransportConnection acceptInvitation(int code, long timeout);
}