base
Class PoddydClient

java.lang.Object
  extended by base.PoddydClient

public class PoddydClient
extends Object

This class implements the client connection to the remote poddy-server to retrieve/update CD and DVD data and to synchronize with a users remote account that contains scheduled recording information. Here within this class all functionalities for connectiong with the poddy-server "poddyd" and the poddy-protocol is implemented


Constructor Summary
PoddydClient()
          Default constructor for a PoddydClient object, here the socket connection to the poddy server is established to communicate with it in further method calls
 
Method Summary
 void close()
          Closes the connection to the poddy-server; after this method has been called the PoddydClient object canT be used any longer
 CDInfo getCD(CDInfo info)
          Tries to retrieve information about a CD from the CD database; this functionality is not related to a user account, therefore no authentication is required
 DVDInfo getDVD(DVDInfo info)
          Tries to retrieve information about a DVD from the DVD database; this functionality is not related to a user account, therefore no authentication is required
 void setCD(CDInfo info)
          Sends information about a possibly new CD; this functionality is not related to a user account, therefore no authentication is required
 void setDVD(DVDInfo info)
          Sends information about a possibly new DVD; this functionality is not related to a user account, therefore no authentication is required
 void setStations(StationsList list, String uname, String hash)
          Sends the local list of known TV stations to the remote account of a user so that the latest list is available within the web interface; this method is called every time a new scan for TV stations was done, the TV stations have been re-arranged by the user or at least one TV station was edited
 void syncAll(SQLLocalAccess SQL, String uname, String hash)
          Performs a full synchronisation of all remote and local userdata with new and deleted schedules
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PoddydClient

public PoddydClient()
             throws Exception
Default constructor for a PoddydClient object, here the socket connection to the poddy server is established to communicate with it in further method calls

Throws:
Exception
Method Detail

syncAll

public void syncAll(SQLLocalAccess SQL,
                    String uname,
                    String hash)
Performs a full synchronisation of all remote and local userdata with new and deleted schedules

Parameters:
SQL - local SQL connection object that handles the stored scheduling information
uname - remote username to authenticate with
hash - remote password hash value to authenticate with

setStations

public void setStations(StationsList list,
                        String uname,
                        String hash)
Sends the local list of known TV stations to the remote account of a user so that the latest list is available within the web interface; this method is called every time a new scan for TV stations was done, the TV stations have been re-arranged by the user or at least one TV station was edited

Parameters:
list - the new list of TV stations
uname - remote username to authenticate with
hash - remote password hash value to authenticate with

setCD

public void setCD(CDInfo info)
Sends information about a possibly new CD; this functionality is not related to a user account, therefore no authentication is required

Parameters:
info - the new CDInfo data to be stored within the global database; these values are rejected on server side in case there already exists a CD with this identifier

getCD

public CDInfo getCD(CDInfo info)
Tries to retrieve information about a CD from the CD database; this functionality is not related to a user account, therefore no authentication is required

Parameters:
info - a CDInfo object that contains discid and tracksid values that uniquely identify this CD
Returns:
a CDInfo object with valid information for this CD or null if no entry for this CD exists in the poddy-database

setDVD

public void setDVD(DVDInfo info)
Sends information about a possibly new DVD; this functionality is not related to a user account, therefore no authentication is required

Parameters:
info - the new DCDInfo data to be stored within the global database; these values are rejected on server side in case there already exists a DVD with this identifier

getDVD

public DVDInfo getDVD(DVDInfo info)
Tries to retrieve information about a DVD from the DVD database; this functionality is not related to a user account, therefore no authentication is required

Parameters:
info - a DVDInfo object that contains crcid value that uniquely identify this DVD
Returns:
a DVDInfo object with valid information for this DVD or null if no entry for this DVD exists in the poddy-database

close

public void close()
Closes the connection to the poddy-server; after this method has been called the PoddydClient object canT be used any longer