Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Url.h

Go to the documentation of this file.
00001 /* 00002 * Copyright (C) 2000 KOM/Darmstadt University of Technology 00003 * 00004 * This program is free software; you can redistribute it and/or modify it 00005 * under the terms of the GNU General Public License as published by the 00006 * Free Software Foundation; either version 2, or (at your option) any 00007 * later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 00017 * USA. 00018 */ 00019 #ifndef URL_H 00020 #define URL_H 00021 00022 #include "mnstream.h" 00023 00024 /*********************************************************************** 00025 * Url 00026 ***********************************************************************/ 00027 00028 class Url 00029 { 00030 public: 00031 enum Protocol { 00032 P_INVALID = 0, 00033 P_RTSP = 1, 00034 P_FILE = 2, 00035 P_RTP = 3, 00036 P_HTTP = 4 00037 }; 00038 00039 private: 00040 char* _url; 00041 char* _mem; 00042 const char* _path; 00043 const char* _pcol; 00044 const char* _host; 00045 const char* _user; 00046 const char* _port; 00047 00048 public: 00049 Url( ); 00050 Url( const Url& orig ); 00051 Url( const char* url ); 00052 ~Url( ); 00053 00054 Url& operator= ( const Url& orig ); 00055 00056 const char* getUrl( ) const; 00057 const char* getHost( ) const; 00058 const char* getPath( ) const; 00059 Protocol getProtocol( ) const; 00060 bool isValid( ) const; 00061 void validate( const char* input ); 00062 bool hasPort( ) const; 00063 int getPortAsInt( ) const; 00064 00065 friend ostream& operator<<( ostream& ostr, Protocol url ); 00066 }; 00067 00068 #endif // URL_H 00069

Generated on Sun Mar 6 13:35:50 2005 for Komssys by doxygen 1.3.8