com.motorola.iden.recentcalls
Class RecentCalls

java.lang.Object
  |
  +--com.motorola.iden.recentcalls.RecentCalls

public class RecentCalls
extends java.lang.Object


Constructor Summary
RecentCalls()
          Constructor
 
Method Summary
 int capacity()
          This method retrives the capacity of Recnet Calls List
 int currentUsage()
          This method retrives the current usage of Recent Calls List in java.
 boolean doesContain(RecentCallsEntry myEntry)
          This method checkes if the entry is in Recent Calls List in java or not.
 RecentCallsEntry entryAt(int index)
          This methond retrives a single Entry at requested index from Recent Calls Entry list.
 RecentCallsEntry firstEntry()
          This method retrives the first Entry from Recent Calls Entry list.
 int indexOf(RecentCallsEntry myEntry)
          This method retrives the index of a specific Recent Calls Entry.
 boolean isListEmpty()
          To Check if the Recent Calls List is empty or not.
 RecentCallsEntry lastEntry()
          This method retrives the last Entry from Recent Calls Entry list.
 int numIncomingCalls()
          This method retrives the number of Incoming calls in Recent Calls List.
 int numMissedCalls()
          This method retrives number of Missed calls in Recent calls list.
 int numOutgoingCalls()
          This Method retrives the number of outgoing calls in Recent Calls List.
 boolean refreshList()
          Refreshes the Recent Calls List.
 boolean removeAll()
          Deletes the entire recent calls list.
 boolean removeEntryAt(int entryNumber)
          Deletes a single requested entry from recent calls list.
 void setRCLListener(RCLListener l)
          This Methond needs to be called from constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecentCalls

public RecentCalls()
Constructor

Method Detail

entryAt

public RecentCallsEntry entryAt(int index)
                         throws java.lang.IllegalArgumentException
This methond retrives a single Entry at requested index from Recent Calls Entry list. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Parameters:
index - The Entry Number to be retrived (Starting with zero)/
Returns:
The RecentCallsEntry element requested
Throws:
java.lang.IllegalArgumentException - Thrown when the entryNumber is out of range
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

firstEntry

public RecentCallsEntry firstEntry()
This method retrives the first Entry from Recent Calls Entry list. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Returns:
The first entry if the list is not empty. null if the list is empty
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

lastEntry

public RecentCallsEntry lastEntry()
This method retrives the last Entry from Recent Calls Entry list. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Returns:
The last entry if the list is not empty. null if the list is empty
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

refreshList

public boolean refreshList()
Refreshes the Recent Calls List. This function must be called after removeEntryAt or RemoveAll operation is perfomed

Returns:
True if the operation is successful. False if the operation is unsuccessful
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

capacity

public int capacity()
This method retrives the capacity of Recnet Calls List

Returns:
The maximun number of Recent Calls that can be stored on phone

doesContain

public boolean doesContain(RecentCallsEntry myEntry)
This method checkes if the entry is in Recent Calls List in java or not. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Parameters:
myEntry - The entry that is to be checked
Returns:
True if the entry is there otherwise return false
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

indexOf

public int indexOf(RecentCallsEntry myEntry)
This method retrives the index of a specific Recent Calls Entry. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Parameters:
myEntry - the Recent Calls Entry whose index is to be retrived
Returns:
The index of requested Recent Calls Entry
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

currentUsage

public int currentUsage()
This method retrives the current usage of Recent Calls List in java. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Returns:
The current usage of Recent Calls List in java
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

isListEmpty

public boolean isListEmpty()
To Check if the Recent Calls List is empty or not. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Returns:
True is the list is empty else return false
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

numIncomingCalls

public int numIncomingCalls()
This method retrives the number of Incoming calls in Recent Calls List. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Returns:
number of Incoming calls from the list. If the Recent Calls List is empty return -1
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

numOutgoingCalls

public int numOutgoingCalls()
This Method retrives the number of outgoing calls in Recent Calls List. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Returns:
number of outgoing calls from the list. If the Recent Calls List is empty return -1
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

numMissedCalls

public int numMissedCalls()
This method retrives number of Missed calls in Recent calls list. It is very important that the MIDlet calls refreshList() before calling this function. Otherwiser the API will refresh the recent calls list

Returns:
number of Missed calls from the list. If the Recent Calls List is empty return -1
Throws:
java.lang.SecurityException - - if application does not have right permission to read Recent Calls

removeEntryAt

public boolean removeEntryAt(int entryNumber)
                      throws java.lang.IllegalArgumentException
Deletes a single requested entry from recent calls list. refreshList() must be called after removeEntryAt() function is called

Parameters:
entryNumber - The Entry Number to be deleted from Recent Calls list (starting from zero)
Returns:
true if removeElementAt operation is successful else return false
Throws:
throws - IllegalArgumentException Throws when entryNumber is out of range
java.lang.SecurityException - - if application does not have right permission to write to Recent Calls

removeAll

public boolean removeAll()
Deletes the entire recent calls list. refreshList() function must be called after removeAll() function is called

Returns:
True if removeAll operation is successful else return false
Throws:
java.lang.SecurityException - - if application does not have right permission to write to Recent Calls

setRCLListener

public void setRCLListener(RCLListener l)
This Methond needs to be called from constructor. It registers the MIDlet with the recent calls listener and updates it everytime the recent calls data has changed

Parameters:
RCLListener - object of RCLListener class