00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00030
00031 #ifndef KIO_SMB_INTERNAL_H_INCLUDED
00032 #define KIO_SMB_INTERNAL_H_INCLUDED
00033
00034 #include <kio/authinfo.h>
00035
00043 enum SMBUrlType {
00044 SMBURLTYPE_UNKNOWN = 0, SMBURLTYPE_ENTIRE_NETWORK = 1,
00045 SMBURLTYPE_WORKGROUP_OR_SERVER = 2, SMBURLTYPE_SHARE_OR_PATH = 3
00046 };
00047
00048
00049
00056 class SMBUrl : public KURL
00057 {
00058
00059
00060 public:
00061 SMBUrl();
00062 SMBUrl(const KURL & kurl);
00063
00068 void addPath(const TQString &filedir);
00069
00070 bool cd(const TQString &dir);
00071
00079 SMBUrlType getType() const;
00080
00081 void setPass( const TQString& _txt ) { KURL::setPass(_txt); updateCache(); }
00082 void setUser( const TQString& _txt ) { KURL::setUser(_txt); updateCache(); }
00083 void setHost( const TQString& _txt ) { KURL::setHost(_txt); updateCache(); }
00084
00088
00089
00093
00094
00098 TQCString toSmbcUrl() const { return m_surl; }
00099
00100 private:
00104 TQCString fromUnicode( const TQString &_str ) const;
00105
00106 void updateCache();
00107 TQCString m_surl;
00108
00113 mutable SMBUrlType m_type;
00114 };
00115
00116
00117 #endif
00118