RoutingService Class Reference

RoutingService class for communicating with CloudMade server and parsing routing data. More...

#include <routingservice.h>

Collaboration diagram for RoutingService:
Collaboration graph
[legend]

List of all members.

Public Slots

void requestFinished (QNetworkReply *reply)
 Public slot, which indicates when http request has been completed.
void requestRoute (const GeoCoordinate &from, const GeoCoordinate &to)
 Request routing information from the server.

Signals

void error (const int context, const int error)
 Signals error.
void routeParsed (Route &route)
 Emited when route is parsed and is ready for further processing.

Public Member Functions

 RoutingService (QObject *parent=0)
 Default constructor.

Private Member Functions

void parseRouteData (const QByteArray &jsonReply)
 Parses routing data from JSON string.
void requestAuthorizationToken ()
 Request authorization token.
void sendRequest (const QUrl &url)
 Sends http request.

Private Attributes

QString m_pendingRequest
 Placeholder for pending route request.
QString m_token
 Placeholder for authentication token.
NetworkAccessManagerm_networkManager
 Pointer to QNetworkAccessManager.

Detailed Description

RoutingService class for communicating with CloudMade server and parsing routing data.

Author:
Henri Lampela - henri.lampela@ixonos.com
Sami Rämö - sami.ramo@ixonos.com

Constructor & Destructor Documentation

RoutingService::RoutingService ( QObject *  parent = 0  ) 

Default constructor.

Parameters:
parent instance of parent

Member Function Documentation

void RoutingService::error ( const int  context,
const int  error 
) [signal]

Signals error.

Parameters:
context error context
error error code
void RoutingService::parseRouteData ( const QByteArray &  jsonReply  )  [private]

Parses routing data from JSON string.

Parameters:
jsonReply JSON string
void RoutingService::requestFinished ( QNetworkReply *  reply  )  [slot]

Public slot, which indicates when http request has been completed.

Parameters:
reply storage for http reply
void RoutingService::requestRoute ( const GeoCoordinate from,
const GeoCoordinate to 
) [slot]

Request routing information from the server.

Parameters:
from Start point of the route
to End point of the route
void RoutingService::routeParsed ( Route route  )  [signal]

Emited when route is parsed and is ready for further processing.

Parameters:
route Route item containing parsed route details
void RoutingService::sendRequest ( const QUrl &  url  )  [private]

Sends http request.

Parameters:
url destination

The documentation for this class was generated from the following files:

Generated on Fri Sep 3 12:05:42 2010 for Situare client for Maemo by  doxygen 1.6.1