00001 /* 00002 * Copyright (c) 2009, Czech Technical University in Prague 00003 * All rights reserved. 00004 * 00005 * Authors/Contact: 00006 * 00007 * Petr Vlacil 00008 * (vlacipet@fel.cvut.cz) 00009 * R&D Centre (RDC) for Mobile Applications 00010 * Dept of Telecommunications Engineering 00011 * Faculty of Electrical Engineering 00012 * Czech Technical University in Prague 00013 * Technicka 2, 166 27 Prague 6, Czech Republic 00014 * 00015 * Redistribution and use in source and binary forms, with or 00016 * without modification, are permitted provided that the following 00017 * conditions are met: 00018 * 00019 * 1. Redistributions of source code must retain the above copyright 00020 * notice, this list of conditions and the following disclaimer. 00021 * 2. Redistributions in binary form must reproduce the above copyright 00022 * notice, this list of conditions and the following disclaimer in 00023 * the documentation and/or other materials provided with the 00024 * distribution. 00025 * 3. Neither the name of the Czech Technical University in Prague nor 00026 * the names of its contributors may be used to endorse or promote 00027 * products derived from this software without specific prior 00028 * written permission. 00029 * 00030 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00031 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00032 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00033 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 00034 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00035 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 00036 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00037 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00038 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00039 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00040 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00041 * 00042 */ 00043 00044 00045 #ifndef MLP_POSITION_H 00046 #define MLP_POSITION_H 00047 00048 00049 /** 00050 * \file 00051 * \brief MlpTagNames header file 00052 * 00053 * This file contains MlpTagNames class declaration. 00054 * 00055 * \author Petr Vláčil 00056 */ 00057 00058 00059 //-------------------------------------------------------------------------- 00060 // Standard libraries 00061 //-------------------------------------------------------------------------- 00062 #include <string> 00063 00064 //-------------------------------------------------------------------------- 00065 // MLP-Lib-Cpp library files 00066 //-------------------------------------------------------------------------- 00067 #include <libmlp-cpp/MlpShape.hpp> 00068 #include <libmlp-cpp/MlpGsmNetParams.hpp> 00069 00070 00071 /** 00072 * \brief Class that represents position. 00073 */ 00074 class MlpPosition{ 00075 protected: 00076 std::string _msid; 00077 int _msidType; 00078 int _msidEnc; 00079 int _posMethod; 00080 int _resultType; 00081 std::string _transId; 00082 std::string _time; 00083 std::string _utcOff; 00084 00085 bool _error; 00086 std::string _result; 00087 std::string _resultId; 00088 std::string _addInfo; 00089 00090 std::string _alt; 00091 std::string _altUnc; 00092 00093 MlpShape* _shape; 00094 MlpGsmNetParams* _gsmNetParams; 00095 00096 public: 00097 MlpPosition (); 00098 ~MlpPosition (); 00099 00100 void setMsid ( std::string msid ); 00101 std::string getMsid (); 00102 00103 void setMsidType ( int msidType ); 00104 int getMsidType (); 00105 00106 void setMsidEnc ( int msidEnc ); 00107 int getMsidEnc (); 00108 00109 void setPosMethod ( int posMethod ); 00110 int getPosMethod (); 00111 00112 void setResultType ( int resultType ); 00113 int getResultType (); 00114 00115 void setTransId ( std::string transId ); 00116 std::string getTransId (); 00117 00118 void setTime ( std::string time ); 00119 std::string getTime (); 00120 00121 void setTimeUtcOff ( std::string utcOff ); 00122 std::string getTimeUtcOff (); 00123 00124 void setResult ( std::string result ); 00125 std::string getResult (); 00126 bool wasError(); 00127 00128 void setResultId ( std::string resultId ); 00129 std::string getResultId (); 00130 00131 void setAddInfo ( std::string addInfo ); 00132 std::string getAddInfo (); 00133 00134 void setAlt ( std::string alt ); 00135 std::string getAlt (); 00136 00137 void setAltUnc ( std::string altUnc ); 00138 std::string getAltUnc (); 00139 00140 void setShape ( MlpShape* shape ); 00141 MlpShape* getShape (); 00142 00143 void setGsmNetParams ( MlpGsmNetParams * gsmNetParams ); 00144 MlpGsmNetParams* setGsmNetParams (); 00145 00146 std::string toString() const; 00147 00148 }; 00149 00150 00151 #endif