basiclocationinfodisplay/blid/engine/inc/MBlidRouter.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Blid route can be modified
       
    15 *                and read with help of this API.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __MBLIDROUTER_H__
       
    22 #define __MBLIDROUTER_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <lbsposition.h> // TPositionModuleId
       
    26 #include <s32strm.h>
       
    27 #include <EPos_CPosLandmark.h>
       
    28 #include "TNamedCoordinate.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class TNamedCoordinate;
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  This Blid application engine API is only used by Blid application.
       
    37 *  Blid route can be modified and read with help of this API.
       
    38 *
       
    39 */
       
    40 class MBlidRouter
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43         /**
       
    44          * Destructor.
       
    45          */
       
    46         virtual ~MBlidRouter(){};
       
    47 
       
    48     public: // New functions
       
    49 		/**
       
    50 		 * Get coordinates
       
    51 		 *
       
    52 		 * @param aIndex of coordinates
       
    53 		 * @return reference to coordinates
       
    54 		 */
       
    55 		virtual TNamedCoordinate& At( TInt aIndex ) = 0;
       
    56 
       
    57 		/**
       
    58 		 * Append coordinates
       
    59 		 *
       
    60 		 * @param aCoordinates
       
    61          * @return Error value
       
    62 		 */
       
    63 		virtual TInt AppendL( TNamedCoordinate* aCoordinate, TBool aCheckForMemory ) = 0;
       
    64 
       
    65 		/**
       
    66 		 * Delete coordinates
       
    67 		 *
       
    68 		 * @param aIndex of coordinates
       
    69 		 */
       
    70 		virtual TInt RemoveL( TInt aIndex ) = 0;
       
    71 
       
    72         /**
       
    73          * Delete all item from coordinate array
       
    74          */
       
    75         virtual void ResetAndDestroy() = 0;
       
    76 
       
    77 		/**
       
    78 		 * Get count of coordinates
       
    79 		 *
       
    80 		 * @return number of objects
       
    81 		 */
       
    82 		virtual TInt Count() = 0;
       
    83 
       
    84         /**
       
    85          * Waypoint getter
       
    86          * Ownership not transferred
       
    87          * 
       
    88          * @return reference to the waypoint
       
    89          */
       
    90         virtual TNamedCoordinate* Waypoint() = 0;
       
    91 
       
    92         /**
       
    93          * Get waypoint's index in waypoint array
       
    94          * @return index
       
    95          */
       
    96         virtual TInt IndexOfWaypoint() const = 0;
       
    97             
       
    98         /**
       
    99          * Set waypoint 
       
   100          *
       
   101          * @param index of RouterModel array
       
   102          */
       
   103         virtual void SetWaypoint( const TInt aIndex ) = 0;
       
   104         
       
   105         /**
       
   106          * Remove waypoint
       
   107          *
       
   108          */
       
   109         virtual void RemoveWaypoint() = 0;
       
   110 
       
   111         /**
       
   112          * Save engine's data to file
       
   113          * @param aStream A reference to RWriteStream
       
   114          */ 
       
   115         virtual void ExternalizeL( RWriteStream& aStream ) = 0;
       
   116 
       
   117         /**
       
   118          * Load initial data from file 
       
   119          * @param aSteam A reference to RReadStream
       
   120          */
       
   121         virtual void InternalizeV1L( RReadStream& aStream ) = 0;
       
   122         
       
   123         /**
       
   124          * Landmark data getter
       
   125          * Ownership not transferred
       
   126          * 
       
   127          * @return reference to CPosLandmark
       
   128          */
       
   129         virtual CPosLandmark* Landmark() const = 0;
       
   130         
       
   131         /**
       
   132          * Set Landmark. Router takes ownership
       
   133          * 
       
   134          * @param of type CPosLandmark
       
   135          */
       
   136         virtual void SetLandmark(CPosLandmark* aLandmark) = 0;
       
   137 
       
   138         /**
       
   139          * To check if waypoint or landmark is currently set
       
   140          * 
       
   141          * @return ETrue if set EFalse otherwise
       
   142          */
       
   143 		virtual TBool IsWaypointSet() = 0;
       
   144 		
       
   145 		/**
       
   146          * To check if any one waypoint or landmark is set
       
   147          * 
       
   148          * @return ETrue if set EFalse otherwise
       
   149          */
       
   150 		virtual TBool IsAnyPointSet() = 0;
       
   151 		
       
   152 		/**
       
   153          * Sets the latitude and longitude for manual waypoint
       
   154          *          
       
   155          */
       
   156 		virtual void SetManualWaypoint(TReal latitude, TReal longitude, TDesC& aName) = 0;
       
   157 		
       
   158 		/**
       
   159          * Clears if Landmark or waypoint is set
       
   160          * 
       
   161          */
       
   162 		virtual void ClearSetPoints() = 0;
       
   163 		
       
   164 		/**
       
   165          * Give waypoints index
       
   166          * 
       
   167          */
       
   168         virtual TInt FindWaypointIndex( TNamedCoordinate* aCoordinate ) = 0;
       
   169     };
       
   170 
       
   171 #endif      // __MBLIDROUTER_H__
       
   172 
       
   173 // End of File