mirror of https://github.com/tasks/tasks
Some stubs for client/server messaging
parent
552c7b4460
commit
1a151f7891
@ -0,0 +1,5 @@
|
|||||||
|
package com.todoroo.astrid.actfm.sync.messages;
|
||||||
|
|
||||||
|
public class BriefMe implements ClientToServerMessage {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.todoroo.astrid.actfm.sync.messages;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.todoroo.astrid.data.OutstandingEntry;
|
||||||
|
import com.todoroo.astrid.data.RemoteModel;
|
||||||
|
|
||||||
|
public class ChangesHappened<TYPE extends RemoteModel> implements ClientToServerMessage {
|
||||||
|
|
||||||
|
private final Class<? extends RemoteModel> modelClass;
|
||||||
|
private final long id;
|
||||||
|
private final long uuid;
|
||||||
|
private final List<OutstandingEntry<TYPE>> changes;
|
||||||
|
private long pushedAt;
|
||||||
|
|
||||||
|
public ChangesHappened(TYPE entity) {
|
||||||
|
this.modelClass = entity.getClass();
|
||||||
|
this.id = entity.getId();
|
||||||
|
this.uuid = entity.getValue(RemoteModel.REMOTE_ID_PROPERTY);
|
||||||
|
this.changes = new ArrayList<OutstandingEntry<TYPE>>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
package com.todoroo.astrid.actfm.sync.messages;
|
||||||
|
|
||||||
|
public interface ClientToServerMessage {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
package com.todoroo.astrid.actfm.sync.messages;
|
||||||
|
|
||||||
|
public class RequestDoubleCheck implements ClientToServerMessage {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,5 @@
|
|||||||
|
package com.todoroo.astrid.actfm.sync.messages;
|
||||||
|
|
||||||
|
public interface ServerToClientMessage {
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue