com.vodafone360.people.service.interfaces
Interface IPeopleService

All Known Implementing Classes:
IPeopleServiceImpl

public interface IPeopleService

Interface to expose service functionality to the UI classes.


Method Summary
 void addEventCallback(Handler uiHandler)
          Allows the Activity to register a Handler, so that it can receive new call back events from the Service layer.
 void checkForUpdates()
          Push the UpdateEngine to immediately check for an updated version of the client.
 void downloadMeProfileFirstTime()
          This method triggers the Me Profile download, is currently called by UI
 void fetchAvailableIdentities(Bundle data)
          Begins the process of retrieving all Third party Accounts from the Vodafone 360 back end.
 void fetchMyIdentities(Bundle data)
          Begins the process of retrieving Third party Accounts that the user is already registered with from the Vodafone 360 back end.
 void fetchPrivacyStatement()
          Fetched the current Privacy Statement information from the Vodafone 360 back end system.
 void fetchTermsOfService()
          Fetched the current Terms of Service information from the Vodafone 360 back end system.
 void fetchUsernameState(java.lang.String username)
          Asks the back end server to check the validity of the given user name.
 boolean getLoginRequired()
          Called by the UI to determine if the Service is currently logged into the Vodafone 360 back end.
 void getMoreTimelines()
          This method should be called to retrieve older timelines in TimelineListActivity, @see ActivitiesEngine.
 NetworkAgentState getNetworkAgentState()
          Returns the current state of the Network Agent.
 void getOlderStatuses()
          This method should be called to retrieve older statuses in StatusListActivity, @see ActivitiesEngine.
 void getPresenceList(long contactId)
          Request a refresh of the currently known Presence information (used for testing only)
 boolean getRoamingDeviceSetting()
          Gets the current IS_ROAMING_ALLOWED value for the device, which is set by the user in the "Menu > Settings > Wireless Controls > Mobile network settings > Data roaming" check box.
 int getRoamingNotificationType()
          Gets the type of roaming notification to show to the user
 void getStatuses()
          This method should be called to retrieve status updates in StatusListActivity, @see ActivitiesEngine.
 void logon(LoginDetails loginDetails)
          Log into the Vodafone 360 back end system using the given credentials.
 void notifyDataSettingChanged(PersistSettings.InternetAvail internetAvail)
          Sets the current Data connectivity preference (i.e. connect, connect when not roaming, or never connect), although this value is ignored during initial sign up.
 void pingUserActivity()
          Pings the service about user activity.
 void register(RegistrationDetails details)
          Signs up a new user to the Vodafone 360 back end using the given Registration details.
 void removeEventCallback(Handler uiHandler)
          Allows the Activity to unregister a Handler, so it will no longer receive call back events from the Service layer.
 void sendMessage(long toLocalContactId, java.lang.String body, int socialNetworkId)
          This method should be used to send a message to a contact
 void setAvailability(java.util.Hashtable<java.lang.String,java.lang.String> myself)
          Alter the current Social Network availability state and send it to the server.
 void setIdentityStatus(java.lang.String network, java.lang.String identityId, boolean identityStatus)
          Calls the set identity capability status API
 void setNetworkAgentState(NetworkAgentState state)
          Overrides the current state of the Network Agent.
 void setNewUpdateFrequency()
          Push the UpdateEngine to check if a new update frequency has been set and to act accordingly.
 void setShowRoamingNotificationAgain(boolean showAgain)
          Sets a preference that disables the showing of further roaming notifications.
 void startBackgroundContactSync(long delay)
          Begins the process of synchronising contacts with the Vodafone 360 back end.
 void startContactSync()
          Begins the process of synchronising contacts with the Vodafone 360 back end.
 void startStatusesSync()
          Push the ActivitiesEngine Engine to begin synchronising Activities
 void subscribe(Handler handler, java.lang.Long contactId, boolean chat)
          Allows an Activity to indicate to the Service that it is ready and able to handle incoming unsolicited UI events.
 void unsubscribe(Handler handler)
          Allows the Activity to indicate that it is no longer in the foreground and will not handle incoming UI events correctly.
 void updateChatNotification(long localContactId)
          This method should be called to update the Chat Notifications.
 void uploadMeProfile()
          This method triggers the Me Profile upload
 void uploadMyStatus(java.lang.String statusText)
          This method triggers the Me Profile status text upload
 void validateIdentityCredentials(boolean dryRun, java.lang.String network, java.lang.String username, java.lang.String password, Bundle identityCapabilityStatus)
          Validate the given Social Network identity
 

Method Detail

addEventCallback

void addEventCallback(Handler uiHandler)
Allows the Activity to register a Handler, so that it can receive new call back events from the Service layer.

Parameters:
Handler - to listen for call back events.

removeEventCallback

void removeEventCallback(Handler uiHandler)
Allows the Activity to unregister a Handler, so it will no longer receive call back events from the Service layer. Usually called on an Activity's onDestroy() method.

Parameters:
Handler - to listen for call back events.

getLoginRequired

boolean getLoginRequired()
Called by the UI to determine if the Service is currently logged into the Vodafone 360 back end. Called by the StartActivity and other key classes, so the work flow can be diverted back to the Landing page if the user has been signed out for any reason.

Returns:
TRUE Service is logged into the back end system, FALSE user must log in before they can use the Application.

setShowRoamingNotificationAgain

void setShowRoamingNotificationAgain(boolean showAgain)
Sets a preference that disables the showing of further roaming notifications.

Parameters:
TRUE - show further roaming notifications, FALSE stop showing

getRoamingNotificationType

int getRoamingNotificationType()
Gets the type of roaming notification to show to the user

Returns:
ROAMING_DIALOG_GLOBAL_ON Data roaming is on, ROAMING_DIALOG_GLOBAL_OFF Data roaming is off

getRoamingDeviceSetting

boolean getRoamingDeviceSetting()
Gets the current IS_ROAMING_ALLOWED value for the device, which is set by the user in the "Menu > Settings > Wireless Controls > Mobile network settings > Data roaming" check box.

Returns:
TRUE when roaming is permitted, FALSE when roaming is not permitted.

notifyDataSettingChanged

void notifyDataSettingChanged(PersistSettings.InternetAvail internetAvail)
Sets the current Data connectivity preference (i.e. connect, connect when not roaming, or never connect), although this value is ignored during initial sign up.

Parameters:
InternetAvail - New data Settings changes
See Also:
PersistSettings.InternetAvail

fetchTermsOfService

void fetchTermsOfService()
Fetched the current Terms of Service information from the Vodafone 360 back end system. The result is sent to the registered Handler some time later after the download process has finished.


fetchPrivacyStatement

void fetchPrivacyStatement()
Fetched the current Privacy Statement information from the Vodafone 360 back end system. The result is sent to the registered Handler some time later after the download process has finished.


logon

void logon(LoginDetails loginDetails)
Log into the Vodafone 360 back end system using the given credentials.

Parameters:
LoginDetails - object containing user name, password, etc.

fetchUsernameState

void fetchUsernameState(java.lang.String username)
Asks the back end server to check the validity of the given user name.

Parameters:
String - User name to check.

register

void register(RegistrationDetails details)
Signs up a new user to the Vodafone 360 back end using the given Registration details.

Parameters:
RegistrationDetails - Registration details

startContactSync

void startContactSync()
Begins the process of synchronising contacts with the Vodafone 360 back end. This is designed to run in the foreground and be shown to the user during the initial sign up process.


startBackgroundContactSync

void startBackgroundContactSync(long delay)
Begins the process of synchronising contacts with the Vodafone 360 back end. This is designed to run in the background and is called every time the ContactListActivity is shown to the user.

Parameters:
delay - the delay in milliseconds from now when the sync should start

pingUserActivity

void pingUserActivity()
Pings the service about user activity.


fetchMyIdentities

void fetchMyIdentities(Bundle data)
Begins the process of retrieving Third party Accounts that the user is already registered with from the Vodafone 360 back end. The response is sent to any currently registered Activity handlers.

Parameters:
Bundle - filter the kind of identities to return.

fetchAvailableIdentities

void fetchAvailableIdentities(Bundle data)
Begins the process of retrieving all Third party Accounts from the Vodafone 360 back end. The response is sent to any currently registered Activity handlers.

Parameters:
Bundle - filter the kind of identities to return.

setIdentityStatus

void setIdentityStatus(java.lang.String network,
                       java.lang.String identityId,
                       boolean identityStatus)
Calls the set identity capability status API

Parameters:
network - Social Network Name
identityId - Social Network Identifier
identityCapabilityStatus - Social Network capability status Bundle

validateIdentityCredentials

void validateIdentityCredentials(boolean dryRun,
                                 java.lang.String network,
                                 java.lang.String username,
                                 java.lang.String password,
                                 Bundle identityCapabilityStatus)
Validate the given Social Network identity

Parameters:
dryRun - Set to true to validate credentials without actually signing the server up.
network - Social Network Name
username - Login user name
password - Login password
identityCapabilityStatus - Social Network capability status Bundle

checkForUpdates

void checkForUpdates()
Push the UpdateEngine to immediately check for an updated version of the client.


setNewUpdateFrequency

void setNewUpdateFrequency()
Push the UpdateEngine to check if a new update frequency has been set and to act accordingly.


startStatusesSync

void startStatusesSync()
Push the ActivitiesEngine Engine to begin synchronising Activities


getNetworkAgentState

NetworkAgentState getNetworkAgentState()
Returns the current state of the Network Agent. Used for testing only.


setNetworkAgentState

void setNetworkAgentState(NetworkAgentState state)
Overrides the current state of the Network Agent. Used for testing only.

Parameters:
state - A new overriding state.

getPresenceList

void getPresenceList(long contactId)
Request a refresh of the currently known Presence information (used for testing only)

Parameters:
contactId - Provide a contactId to receive detailed presence information for the given contact only
contactId - Set this to -1 to receive less detailed presence information but for every contact

setAvailability

void setAvailability(java.util.Hashtable<java.lang.String,java.lang.String> myself)
Alter the current Social Network availability state and send it to the server.

Parameters:
myself - is the wrapper for the own presence state, can be retrieved from PresenceTable.getUserByLocalContactId(long meProfileLocalContactId).

subscribe

void subscribe(Handler handler,
               java.lang.Long contactId,
               boolean chat)
Allows an Activity to indicate to the Service that it is ready and able to handle incoming unsolicited UI events. This should be called in an Activities onResume() method, to indicate that the activity is currently on screen.

Parameters:
handler - to accept incoming unsolicited UI events from the Service.
contactId - Provide a contactId to receive updates for the given contact only. Set this to -1 to receive updates for every contact. Set this to NULL not to receive contact updates.
chat - - TRUE if the Handler expects chat messages.

unsubscribe

void unsubscribe(Handler handler)
Allows the Activity to indicate that it is no longer in the foreground and will not handle incoming UI events correctly. This should be called in an Activities onPause() method, to indicate that the Activity is not on screen.

Parameters:
handler - that should no longer receive incoming unsolicited UI events from the Service

sendMessage

void sendMessage(long toLocalContactId,
                 java.lang.String body,
                 int socialNetworkId)
This method should be used to send a message to a contact

Parameters:
to - LocalContactIds of ContactSummary/TimelineSummary items the message is intended for. Current protocol version only supports a single recipient.
body - Message text

getStatuses

void getStatuses()
This method should be called to retrieve status updates in StatusListActivity, @see ActivitiesEngine.


getMoreTimelines

void getMoreTimelines()
This method should be called to retrieve older timelines in TimelineListActivity, @see ActivitiesEngine.


getOlderStatuses

void getOlderStatuses()
This method should be called to retrieve older statuses in StatusListActivity, @see ActivitiesEngine.


uploadMeProfile

void uploadMeProfile()
This method triggers the Me Profile upload


uploadMyStatus

void uploadMyStatus(java.lang.String statusText)
This method triggers the Me Profile status text upload

Parameters:
statusText - String - new Me Profile status text

downloadMeProfileFirstTime

void downloadMeProfileFirstTime()
This method triggers the Me Profile download, is currently called by UI


updateChatNotification

void updateChatNotification(long localContactId)
This method should be called to update the Chat Notifications.



JavaDoc