Garmin Fleet Management Controller  2.19.0
AobrdDriverItem.h
Go to the documentation of this file.
1 /*********************************************************************
2 *
3 * HEADER NAME:
4 * AobrdDriverItem.h
5 *
6 * Copyright 2012 by Garmin Ltd. or its subsidiaries.
7 *---------------------------------------------------------------------
8 * $NoKeywords$
9 *********************************************************************/
10 #ifndef AobrdDriverItem_H
11 #define AobrdDriverItem_H
12 
13 #include <string>
14 #include <vector>
15 
16 #include "ClientListItem.h"
17 #include "AobrdShipment.h"
18 #include "fmi.h"
19 
25  public ClientListItem
26 {
27 public:
28  typedef std::string key_type;
29 
31  virtual ~AobrdDriverItem();
32 
33  CString getDriverId() const;
34 
35  const key_type & getId() const;
36  CString getPassword() const;
37  CString getFirstName() const;
38  CString getLastName() const;
39  CString getCarrierName() const;
40  CString getCarrierID() const;
41  uint16 getLongTermRuleset() const;
42 #if( FMI_SUPPORT_A615 )
43  uint16 getLoadTypeRuleset() const;
44 #endif
45  uint16 getTimeZone() const;
46 
47  const std::vector<AobrdShipment> & getShipments() const;
48  void addShipment( AobrdShipment & shipment );
49  void replaceShipment( AobrdShipment & shipment, int index );
50  void deleteShipment( int index );
51 
52  void readFromStream( std::istream &aStream );
53  void save();
54  void setId( const key_type & aId );
56 
57  void setPassword( const std::string & aPassword );
58  void setFirstName( const std::string & aFirstName );
59  void setLastName( const std::string & aLastName );
60  void setCarrierName( const std::string & aCarrierName );
61  void setCarrierID( const std::string & aCarrierID );
62  void setLongTermRuleset( const uint16 aRuleset );
63 #if( FMI_SUPPORT_A615 )
64  void setLoadTypeRuleset( const uint16 aRuleset );
65 #endif
66  void setTimeZone( const uint16 aTimeZone );
67 
68  void writeToStream ( std::ofstream &aStream ) const;
69 
70 private:
72  std::string mDriverId;
73 
75  std::string mDriverPassword;
76 
78  std::string mFirstName;
79 
81  std::string mLastName;
82 
84  std::string mCarrierName;
85 
87  std::string mCarrierID;
88 
91 
92 #if( FMI_SUPPORT_A615 )
95 #endif
96 
99 
101  std::vector<AobrdShipment> mShipments;
102 
105 
106 };
107 
108 #endif
virtual ~AobrdDriverItem()
Destructor.
CString getPassword() const
Get item&#39;s password.
std::string mFirstName
The driver first name, UTF8 encoded.
void readFromStream(std::istream &aStream)
Read a AobrdDriverItem from an input stream.
void deleteShipment(int index)
Delete a shipment.
void setFirstName(const std::string &aFirstName)
Set the first name of this driver.
Data structure to holds an AOBRD shipment info. Used by the FmiApplicationLayer to provision shipment...
Definition: AobrdShipment.h:23
const key_type & getId() const
Get item&#39;s ID.
void setLoadTypeRuleset(const uint16 aRuleset)
Set the load type ruleset of this driver.
uint16 getTimeZone() const
Get item&#39;s time zone.
void setCarrierID(const std::string &aCarrierID)
Set the carrier ID of this driver.
CString getDriverId() const
Get the driver ID as a CString.
CString getFirstName() const
Get item&#39;s first name.
std::string mDriverPassword
The driver password, UTF8 encoded.
AobrdDriverItem()
Constructor.
uint16 mLongTermRuleset
The driver long term ruleset.
void setParent(FileBackedMap< AobrdDriverItem > *aParent)
Set the parent map of this item.
uint16 getLoadTypeRuleset() const
Get item&#39;s load type ruleset.
std::string mCarrierName
The driver carrier name, UTF8 encoded.
void setTimeZone(const uint16 aTimeZone)
Set the time zone of this driver.
CString getCarrierName() const
Get item&#39;s carrier name.
std::string key_type
uint16 getLongTermRuleset() const
Get item&#39;s long term ruleset.
void setLongTermRuleset(const uint16 aRuleset)
Set the long term ruleset of this driver.
CString getLastName() const
Get item&#39;s last name.
unsigned short int uint16
16-bit unsigned integer
Definition: garmin_types.h:64
Stores the name associated with a list item that is sent to the client.
Data structure to holds an AOBRD driver info. Used by the FmiApplicationLayer to validate logins when...
uint16 mLoadTypeRuleset
The driver load type ruleset.
void addShipment(AobrdShipment &shipment)
Add a shipment.
const std::vector< AobrdShipment > & getShipments() const
Get the list of shipments.
void writeToStream(std::ofstream &aStream) const
Write a AobrdDriverItem to an output stream.
std::string mDriverId
The driver ID, UTF8 encoded.
void setCarrierName(const std::string &aCarrierName)
Set the carrier name of this driver.
void setPassword(const std::string &aPassword)
Set the password of this driver.
FileBackedMap< AobrdDriverItem > * mParent
The map that this DriverItem is a part of.
void setLastName(const std::string &aLastName)
Set the last name of this driver.
void setId(const key_type &aId)
Set the ID (key) of this item.
void save()
Save this item.
std::string mCarrierID
The driver first name, UTF8 encoded.
std::vector< AobrdShipment > mShipments
The shipments.
uint16 mTimeZone
The driver time zone.
void replaceShipment(AobrdShipment &shipment, int index)
Update a shipment.
CString getCarrierID() const
Get item&#39;s carrier ID.
std::string mLastName
The driver last name, UTF8 encoded.