Modified the project structure, removed module extension and went instead for a non-complete core dependency graph

This commit is contained in:
Ernir Erlingsson
2016-03-13 22:31:14 +01:00
parent 7670bc48ea
commit 4da63b3800
33 changed files with 314 additions and 398 deletions

View File

@@ -0,0 +1,20 @@
package org.briarproject.android.api;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
/**
* Enables background threads to make Android API calls that must be made from
* a thread with a message queue.
*/
public interface AndroidExecutor {
/**
* Runs the given task on the main UI thread and returns a Future for
* getting the result.
*/
<V> Future<V> submit(Callable<V> c);
/** Runs the given task on the main UI thread. */
void execute(Runnable r);
}

View File

@@ -0,0 +1,19 @@
package org.briarproject.android.api;
import org.briarproject.api.sync.GroupId;
/** Manages notifications for private messages and forum posts. */
public interface AndroidNotificationManager {
void showPrivateMessageNotification(GroupId g);
void clearPrivateMessageNotification(GroupId g);
void showForumPostNotification(GroupId g);
void clearForumPostNotification(GroupId g);
void blockNotification(GroupId g);
void unblockNotification(GroupId g);
}

View File

@@ -0,0 +1,27 @@
package org.briarproject.android.api;
/**
* Manages mappings between object references and serialisable handles. This
* enables references to be passed between Android UI objects that belong to
* the same process but can only communicate via serialisation.
*/
public interface ReferenceManager {
/**
* Returns the object with the given handle, or null if no mapping exists
* for the handle.
*/
<T> T getReference(long handle, Class<T> c);
/**
* Creates a mapping between the given reference and a handle, and returns
* the handle.
*/
<T> long putReference(T reference, Class<T> c);
/**
* Removes and returns the object with the given handle, or returns null
* if no mapping exists for the handle.
*/
<T> T removeReference(long handle, Class<T> c);
}