src/com/beem/project/beem/service/aidl/IChatManager.aidl
author Da Risk <darisk972@gmail.com>
Mon, 20 Apr 2009 14:00:00 +0200
changeset 118 8bbe46055004
parent 55 66732dd2cb77
child 419 88e1a96ee8da
permissions -rw-r--r--
fix some bugs. When you receive a new chat, a notification appears. Need some improvements cause if the chat was created before, then close no notification appears (nofif only on new created chat).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
     1
package com.beem.project.beem.service.aidl;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
     2
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
     3
import  com.beem.project.beem.service.Contact;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
     4
import  com.beem.project.beem.service.aidl.IChat;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
     5
import  com.beem.project.beem.service.aidl.IMessageListener;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
     6
import  com.beem.project.beem.service.aidl.IChatManagerListener;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
     7
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
     8
/**
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
     9
 * Aidl interface for a chat manager.
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    10
 * The chat manager will manage all the chat sessions.
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    11
 */
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    12
interface IChatManager {
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    13
    
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    14
    	//IChat createChat(in String jid, in IMessageListener listener);
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    15
    
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    16
    	/**
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    17
    	 * Create a chat session with a contact.
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    18
    	 * @param contact	the contact to chat with
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    19
    	 * @param listener	the callback to call when a new message comes from this chat session
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    20
    	 * @return 		the chat session
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    21
    	 */
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    22
	IChat createChat(in Contact contact, in IMessageListener listener);
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    23
	
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    24
	/**
118
8bbe46055004 fix some bugs. When you receive a new chat, a notification appears.
Da Risk <darisk972@gmail.com>
parents: 55
diff changeset
    25
    	 * Destroy a chat session with a contact.
8bbe46055004 fix some bugs. When you receive a new chat, a notification appears.
Da Risk <darisk972@gmail.com>
parents: 55
diff changeset
    26
    	 * @param chat	the chat session
8bbe46055004 fix some bugs. When you receive a new chat, a notification appears.
Da Risk <darisk972@gmail.com>
parents: 55
diff changeset
    27
    	 */
8bbe46055004 fix some bugs. When you receive a new chat, a notification appears.
Da Risk <darisk972@gmail.com>
parents: 55
diff changeset
    28
	void destroyChat(in IChat chat);
8bbe46055004 fix some bugs. When you receive a new chat, a notification appears.
Da Risk <darisk972@gmail.com>
parents: 55
diff changeset
    29
	
8bbe46055004 fix some bugs. When you receive a new chat, a notification appears.
Da Risk <darisk972@gmail.com>
parents: 55
diff changeset
    30
	/**
55
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    31
	 * Register a callback to call when a new chat session is created.
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    32
	 * @param listener	the callback to add
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    33
	 */
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    34
	void addChatCreationListener(in IChatManagerListener listener);
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    35
	
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    36
	/**
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    37
	 * Remove a callback for the creation of new chat session.
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    38
	 * @param listener	the callback to remove.
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    39
	 */
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    40
	void removeChatCreationListener(in IChatManagerListener listener);
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    41
}