src/com/beem/project/beem/service/aidl/IChatManager.aidl
author Nikita Kozlov <nikita@mbdsys.com>
Sun, 05 Dec 2010 18:45:47 +0100
changeset 929 6cbb9b3117b7
parent 674 af23f43cf6e3
permissions -rwxr-xr-x
merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
599
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
     1
/*
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
     2
    BEEM is a videoconference application on the Android Platform.
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
     3
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
     4
    Copyright (C) 2009 by Frederic-Charles Barthelery,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
     5
                          Jean-Manuel Da Silva,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
     6
                          Nikita Kozlov,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
     7
                          Philippe Lago,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
     8
                          Jean Baptiste Vergely,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
     9
                          Vincent Veronis.
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    10
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    11
    This file is part of BEEM.
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    12
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    13
    BEEM is free software: you can redistribute it and/or modify
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    14
    it under the terms of the GNU General Public License as published by
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    15
    the Free Software Foundation, either version 3 of the License, or
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    16
    (at your option) any later version.
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    17
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    18
    BEEM is distributed in the hope that it will be useful,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    19
    but WITHOUT ANY WARRANTY; without even the implied warranty of
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    20
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    21
    GNU General Public License for more details.
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    22
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    23
    You should have received a copy of the GNU General Public License
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    24
    along with BEEM.  If not, see <http://www.gnu.org/licenses/>.
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    25
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    26
    Please send bug reports with examples or suggestions to
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    27
    contact@beem-project.com or http://dev.beem-project.com/
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    28
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    29
    Epitech, hereby disclaims all copyright interest in the program "Beem"
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    30
    written by Frederic-Charles Barthelery,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    31
               Jean-Manuel Da Silva,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    32
               Nikita Kozlov,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    33
               Philippe Lago,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    34
               Jean Baptiste Vergely,
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    35
               Vincent Veronis.
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    36
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    37
    Nicolas Sadirac, November 26, 2009
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    38
    President of Epitech.
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    39
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    40
    Flavien Astraud, November 26, 2009
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    41
    Head of the EIP Laboratory.
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    42
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    43
*/
55
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    44
package com.beem.project.beem.service.aidl;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    45
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    46
import  com.beem.project.beem.service.Contact;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    47
import  com.beem.project.beem.service.aidl.IChat;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    48
import  com.beem.project.beem.service.aidl.IMessageListener;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    49
import  com.beem.project.beem.service.aidl.IChatManagerListener;
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    50
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    51
/**
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    52
 * Aidl interface for a chat manager.
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    53
 * 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
    54
 */
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    55
interface IChatManager {
599
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    56
55
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    57
    	/**
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    58
    	 * Create a chat session with a contact.
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    59
    	 * @param contact	the contact to chat with
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    60
    	 * @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
    61
    	 * @return 		the chat session
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    62
    	 */
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    63
	IChat createChat(in Contact contact, in IMessageListener listener);
599
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    64
55
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    65
	/**
674
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    66
	 * Get an existing Chat session with a contact.
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    67
	 * @return null if the chat session does not exist.
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    68
	 */
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    69
	IChat getChat(in Contact contact);
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    70
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    71
	/**
118
8bbe46055004 fix some bugs. When you receive a new chat, a notification appears.
Da Risk <darisk972@gmail.com>
parents: 55
diff changeset
    72
    	 * 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
    73
    	 * @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
    74
    	 */
8bbe46055004 fix some bugs. When you receive a new chat, a notification appears.
Da Risk <darisk972@gmail.com>
parents: 55
diff changeset
    75
	void destroyChat(in IChat chat);
599
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    76
419
88e1a96ee8da Retrait des notifications quand on ouvre le chat d'une personne qui vient
Da Risk <darisk972@gmail.com>
parents: 118
diff changeset
    77
        /**
420
ecddfb6c0e2a Checkstyle
Da Risk <darisk972@gmail.com>
parents: 419
diff changeset
    78
	 * @param chat the chat.
419
88e1a96ee8da Retrait des notifications quand on ouvre le chat d'une personne qui vient
Da Risk <darisk972@gmail.com>
parents: 118
diff changeset
    79
         */
88e1a96ee8da Retrait des notifications quand on ouvre le chat d'une personne qui vient
Da Risk <darisk972@gmail.com>
parents: 118
diff changeset
    80
	void deleteChatNotification(in IChat chat);
88e1a96ee8da Retrait des notifications quand on ouvre le chat d'une personne qui vient
Da Risk <darisk972@gmail.com>
parents: 118
diff changeset
    81
118
8bbe46055004 fix some bugs. When you receive a new chat, a notification appears.
Da Risk <darisk972@gmail.com>
parents: 55
diff changeset
    82
	/**
55
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    83
	 * 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
    84
	 * @param listener	the callback to add
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    85
	 */
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    86
	void addChatCreationListener(in IChatManagerListener listener);
599
cdadf4e39f99 Checkstyle
Da Risk <darisk972@gmail.com>
parents: 508
diff changeset
    87
55
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    88
	/**
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    89
	 * 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
    90
	 * @param listener	the callback to remove.
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    91
	 */
66732dd2cb77 Add an interface for sending im message.
Da Risk <darisk972@gmail.com>
parents:
diff changeset
    92
	void removeChatCreationListener(in IChatManagerListener listener);
508
7d8da3df2907 Ajout d'un chat switcher dans l'activite Chat.
Jean-Manuel Da Silva <dasilvj at gmail dot com>
parents: 420
diff changeset
    93
674
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    94
	/**
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    95
	 * Get a list of contact which we are currently chatting.
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    96
	 * @return list of contact.
af23f43cf6e3 Create the Chat only when we send or receive a message
Da Risk <darisk972@gmail.com>
parents: 599
diff changeset
    97
	 */
508
7d8da3df2907 Ajout d'un chat switcher dans l'activite Chat.
Jean-Manuel Da Silva <dasilvj at gmail dot com>
parents: 420
diff changeset
    98
	List<Contact> getOpenedChatList();
419
88e1a96ee8da Retrait des notifications quand on ouvre le chat d'une personne qui vient
Da Risk <darisk972@gmail.com>
parents: 118
diff changeset
    99
}