Friend Class Reference

The representation of a Friend (and of the user itself). More...

#include <Friend.h>

List of all members.

Public Member Functions

 Friend ()
 Contsruct and object representing a friend, initilaized with empty/zero values.
 Friend (QString id, double lng, double lat)
 Construct an object representing a friend.
 Friend (QString id, QGeoCoordinate pos)
 Construct an object representing a friend.
QString getId () const
 Get the Friend's ID.
double getLat () const
 Get the latitude of the Friend's position.
double getLng () const
 Get the longitude of the Friend's position.
QGeoCoordinate getPosition ()
 Get the Friend's position.
QString getPhoto () const
QByteArray getPubKey () const
QByteArray getSymKey ()
 Get the Friend's Symetric key.
QString getSessionId () const
void setId (QString id)
void setName (QString name)
void setLat (double lat)
 Set the Friend's position's latitude.
void setLng (double longitude)
 Set the Friend's position's longitude.
void setPosition (QGeoCoordinate position)
 Set the Friend's position.
void setPhoto (QString photo)
void setPubKey (QByteArray pubKey)
void setSymKey (QByteArray symKey)
 Set the Friend's position.
void setSessionId (QString sessionId)
double distanceTo (double lat, double lng)
 Get the distance from this Friend to the sepcified parameter.
double distanceTo (QGeoCoordinate pos)
 Get the distance from this Friend to the sepcified parameter.

Detailed Description

The representation of a Friend (and of the user itself).

This class represents a person (user or friend) of the location sharing service.


Constructor & Destructor Documentation

QTM_USE_NAMESPACE Friend::Friend (  ) 

Contsruct and object representing a friend, initilaized with empty/zero values.

A Friend has an id (QString), a position (QGeoCoordinate) and a symKey (QByteArray). name(QString), photo (QString), sessionId (QString), pubKey (QByteArray) are currently not used.

Friend::Friend ( QString  id,
double  lat,
double  lng 
)

Construct an object representing a friend.

A Friend has an id (QString), a position (QGeoCoordinate) and a symKey (QByteArray). name(QString), photo (QString), sessionId (QString), pubKey (QByteArray) are currently not used.

Parameters:
id is the Friend's id ion the LSS
lat is the latitude of his position
lng is the longitude of his position
Friend::Friend ( QString  id,
QGeoCoordinate  position 
)

Construct an object representing a friend.

A Friend has an id (QString), a position (QGeoCoordinate) and a symKey (QByteArray). name(QString), photo (QString), sessionId (QString), pubKey (QByteArray) are currently not used.

Parameters:
id is the Friend's id ion the LSS
position are the coordinates of his position

Member Function Documentation

double Friend::distanceTo ( QGeoCoordinate  position  ) 

Get the distance from this Friend to the sepcified parameter.

Parameters:
position indicates the point to which the distance is calculated
Returns:
the distance from the friend to the specified position
double Friend::distanceTo ( double  lat,
double  lng 
)

Get the distance from this Friend to the sepcified parameter.

Parameters:
lat indicates the latitude of the point to which the distance is calculated
lat indicates the longitude of the point to which the distance is calculated
Returns:
the distance from the friend to the specified position
QString Friend::getId (  )  const

Get the Friend's ID.

Returns:
the friends id
double Friend::getLat (  )  const

Get the latitude of the Friend's position.

Returns:
the flatitude of the Friend's position
double Friend::getLng (  )  const

Get the longitude of the Friend's position.

Returns:
the longitude of the friend's position
QGeoCoordinate Friend::getPosition (  ) 

Get the Friend's position.

Returns:
the friends position
QByteArray Friend::getSymKey (  ) 

Get the Friend's Symetric key.

Returns:
the friends symetric key
void Friend::setLat ( double  lat  ) 

Set the Friend's position's latitude.

Parameters:
latitude the friends' latitude
void Friend::setLng ( double  lng  ) 

Set the Friend's position's longitude.

Parameters:
lng the friends position's longitude
void Friend::setPosition ( QGeoCoordinate  position  ) 

Set the Friend's position.

Parameters:
position the friend's position
void Friend::setSymKey ( QByteArray  symKey  ) 

Set the Friend's position.

Parameters:
symkey the frien'ds symetric key

The documentation for this class was generated from the following files:
Generated on Thu Jun 24 21:31:43 2010 for PrivL by  doxygen 1.6.3