src/com/beem/project/beem/service/aidl/IChatManager.aidl
changeset 55 66732dd2cb77
child 118 8bbe46055004
equal deleted inserted replaced
54:dfbb0fbece57 55:66732dd2cb77
       
     1 package com.beem.project.beem.service.aidl;
       
     2 
       
     3 import  com.beem.project.beem.service.Contact;
       
     4 import  com.beem.project.beem.service.aidl.IChat;
       
     5 import  com.beem.project.beem.service.aidl.IMessageListener;
       
     6 import  com.beem.project.beem.service.aidl.IChatManagerListener;
       
     7 
       
     8 /**
       
     9  * Aidl interface for a chat manager.
       
    10  * The chat manager will manage all the chat sessions.
       
    11  */
       
    12 interface IChatManager {
       
    13     
       
    14     	//IChat createChat(in String jid, in IMessageListener listener);
       
    15     
       
    16     	/**
       
    17     	 * Create a chat session with a contact.
       
    18     	 * @param contact	the contact to chat with
       
    19     	 * @param listener	the callback to call when a new message comes from this chat session
       
    20     	 * @return 		the chat session
       
    21     	 */
       
    22 	IChat createChat(in Contact contact, in IMessageListener listener);
       
    23 	
       
    24 	/**
       
    25 	 * Register a callback to call when a new chat session is created.
       
    26 	 * @param listener	the callback to add
       
    27 	 */
       
    28 	void addChatCreationListener(in IChatManagerListener listener);
       
    29 	
       
    30 	/**
       
    31 	 * Remove a callback for the creation of new chat session.
       
    32 	 * @param listener	the callback to remove.
       
    33 	 */
       
    34 	void removeChatCreationListener(in IChatManagerListener listener);
       
    35 }