src/com/beem/project/beem/service/aidl/IChatManager.aidl
changeset 55 66732dd2cb77
child 118 8bbe46055004
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/com/beem/project/beem/service/aidl/IChatManager.aidl	Thu Apr 02 19:00:57 2009 +0200
@@ -0,0 +1,35 @@
+package com.beem.project.beem.service.aidl;
+
+import  com.beem.project.beem.service.Contact;
+import  com.beem.project.beem.service.aidl.IChat;
+import  com.beem.project.beem.service.aidl.IMessageListener;
+import  com.beem.project.beem.service.aidl.IChatManagerListener;
+
+/**
+ * Aidl interface for a chat manager.
+ * The chat manager will manage all the chat sessions.
+ */
+interface IChatManager {
+    
+    	//IChat createChat(in String jid, in IMessageListener listener);
+    
+    	/**
+    	 * Create a chat session with a contact.
+    	 * @param contact	the contact to chat with
+    	 * @param listener	the callback to call when a new message comes from this chat session
+    	 * @return 		the chat session
+    	 */
+	IChat createChat(in Contact contact, in IMessageListener listener);
+	
+	/**
+	 * Register a callback to call when a new chat session is created.
+	 * @param listener	the callback to add
+	 */
+	void addChatCreationListener(in IChatManagerListener listener);
+	
+	/**
+	 * Remove a callback for the creation of new chat session.
+	 * @param listener	the callback to remove.
+	 */
+	void removeChatCreationListener(in IChatManagerListener listener);
+}
\ No newline at end of file