URIParameters.cpp

00001 /*********************************************************************** 00002 * * 00003 * ViTooKi * 00004 * * 00005 * title: URIParameters.cpp * 00006 * * 00007 * * 00008 * * 00009 * ITEC institute of the University of Klagenfurt (Austria) * 00010 * http://www.itec.uni-klu.ac.at * 00011 * * 00012 * * 00013 * For more information visit the ViTooKi homepage: * 00014 * http://ViTooKi.sourceforge.net * 00015 * vitooki-user@lists.sourceforge.net * 00016 * vitooki-devel@lists.sourceforge.net * 00017 * * 00018 * This file is part of ViTooKi, a free video toolkit. * 00019 * ViTooKi is free software; you can redistribute it and/or * 00020 * modify it under the terms of the GNU General Public License * 00021 * as published by the Free Software Foundation; either version 2 * 00022 * of the License, or (at your option) any later version. * 00023 * * 00024 * This program is distributed in the hope that it will be useful, * 00025 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00026 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00027 * GNU General Public License for more details. * 00028 * * 00029 * You should have received a copy of the GNU General Public License * 00030 * along with this program; if not, write to the Free Software * 00031 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, * 00032 * MA 02111-1307, USA. * 00033 * * 00034 ***********************************************************************/ 00035 00036 /*********************************************************************** 00037 * * 00038 * REVISION HISTORY: * 00039 * * 00040 * * 00041 * * 00042 ***********************************************************************/ 00043 00044 /*********************************************************************** 00045 * Video Session Migration System, 2004 * 00046 * Author: Klaus Schoeffmann * 00047 ************************************************************************/ 00048 00049 00050 #include "URIParameters.hpp" 00051 00052 00053 /***********************************************************************/ 00054 URIParameters::URIParameters() 00055 { 00056 fullURI = NULL; 00057 movieId = NULL; 00058 userId = 0; 00059 profileId = 0; 00060 range = NULL; 00061 host = NULL; 00062 port = 0; 00063 sessionId = 0; 00064 action = 0; 00065 section = 0; 00066 subtractSecs = -1; 00067 Globals::sdebug << "\nURIParameters constructor called!"; 00068 } 00069 00070 /***********************************************************************/ 00071 URIParameters::~URIParameters() 00072 { 00073 delete fullURI; 00074 fullURI = NULL; 00075 delete movieId; 00076 movieId = NULL; 00077 delete range; 00078 range = NULL; 00079 delete host; 00080 host = NULL; 00081 } 00082 00083 /***********************************************************************/ 00084 void URIParameters::setFullURI(char* fullURI) 00085 { 00086 if (fullURI != NULL) 00087 { 00088 this->fullURI = semifunc::newStrCpy(fullURI); 00089 } 00090 else 00091 { 00092 this->fullURI= NULL; 00093 } 00094 } 00095 00096 /***********************************************************************/ 00097 void URIParameters::setMovieId(char* movieId) 00098 { 00099 if (movieId != NULL) 00100 { 00101 this->movieId = semifunc::newStrCpy(movieId); 00102 } 00103 else 00104 { 00105 this->movieId = NULL; 00106 } 00107 } 00108 00109 /***********************************************************************/ 00110 void URIParameters::setUserId(uint userId) 00111 { 00112 this->userId = userId; 00113 } 00114 00115 /***********************************************************************/ 00116 void URIParameters::setProfileId(uint profileId) 00117 { 00118 this->profileId = profileId; 00119 } 00120 00121 /***********************************************************************/ 00122 void URIParameters::setRange(char* range) 00123 { 00124 if (range != NULL) 00125 { 00126 this->range = semifunc::newStrCpy(range); 00127 } 00128 else 00129 { 00130 this->range = NULL; 00131 } 00132 } 00133 00134 /***********************************************************************/ 00135 void URIParameters::setHost(char* host) 00136 { 00137 if (host != NULL) 00138 { 00139 this->host = semifunc::newStrCpy(host); 00140 Globals::sdebug << "\nURIParams::setHost(): host copied: " << this->host; 00141 } 00142 else 00143 { 00144 this->host = NULL; 00145 } 00146 } 00147 00148 /***********************************************************************/ 00149 void URIParameters::setPort(uint port) 00150 { 00151 this->port = port; 00152 } 00153 00154 /***********************************************************************/ 00155 void URIParameters::setSessionId(uint sessionId) 00156 { 00157 this->sessionId = sessionId; 00158 } 00159 00160 /***********************************************************************/ 00161 void URIParameters::setAction(uint action) 00162 { 00163 this->action = action; 00164 } 00165 00166 /***********************************************************************/ 00167 void URIParameters::setSection(uint section) 00168 { 00169 this->section = section; 00170 } 00171 00172 /***********************************************************************/ 00173 void URIParameters::setSubtractSecs(int subtractSecs) 00174 { 00175 this->subtractSecs = subtractSecs; 00176 } 00177 00178 /***********************************************************************/ 00179 char* URIParameters::getFullURI() 00180 { 00181 return fullURI; 00182 } 00183 00184 /***********************************************************************/ 00185 char* URIParameters::getMovieId() 00186 { 00187 return movieId; 00188 } 00189 00190 /***********************************************************************/ 00191 uint URIParameters::getUserId() 00192 { 00193 return userId; 00194 } 00195 00196 /***********************************************************************/ 00197 uint URIParameters::getProfileId() 00198 { 00199 return profileId; 00200 } 00201 00202 /***********************************************************************/ 00203 char* URIParameters::getRange() 00204 { 00205 return range; 00206 } 00207 00208 /***********************************************************************/ 00209 char* URIParameters::getHost() 00210 { 00211 return host; 00212 } 00213 00214 /***********************************************************************/ 00215 uint URIParameters::getPort() 00216 { 00217 return port; 00218 } 00219 00220 /***********************************************************************/ 00221 uint URIParameters::getSessionId() 00222 { 00223 return sessionId; 00224 } 00225 00226 /***********************************************************************/ 00227 uint URIParameters::getAction() 00228 { 00229 return action; 00230 } 00231 00232 /***********************************************************************/ 00233 uint URIParameters::getSection() 00234 { 00235 return section; 00236 } 00237 00238 /***********************************************************************/ 00239 int URIParameters::getSubtractSecs() 00240 { 00241 return subtractSecs; 00242 } 00243