.TH "KRemoteEncoding" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KRemoteEncoding \- Allows encoding and decoding properly remote filenames into Unicode. A class for handling remote filenames.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kremoteencoding.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKRemoteEncoding\fP (const char *name=0L)"
.br
.ti -1c
.RI "virtual \fB~KRemoteEncoding\fP ()"
.br
.ti -1c
.RI "\fBQString\fP \fBdecode\fP (const \fBQCString\fP &name) const "
.br
.ti -1c
.RI "\fBQCString\fP \fBencode\fP (const \fBQString\fP &name) const "
.br
.ti -1c
.RI "\fBQCString\fP \fBencode\fP (const \fBKURL\fP &url) const "
.br
.ti -1c
.RI "\fBQCString\fP \fBdirectory\fP (const \fBKURL\fP &url, bool ignore_trailing_slash=true) const "
.br
.ti -1c
.RI "\fBQCString\fP \fBfileName\fP (const \fBKURL\fP &url) const "
.br
.ti -1c
.RI "const char * \fBencoding\fP () const "
.br
.ti -1c
.RI "void \fBsetEncoding\fP (const char *name)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQTextCodec\fP * \fBcodec\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Allows encoding and decoding properly remote filenames into Unicode. A class for handling remote filenames. 

Certain protocols do not specify an appropriate encoding for decoding their 8-bit data into proper Unicode forms. Therefore, ioslaves should use this class in order to convert those forms into QStrings before creating the respective \fBKIO::UDSEntry\fP. The same is true for decoding URLs to its components.
.PP
Each \fBKIO::SlaveBase\fP has one object of this kind, even if it is not necessary. It can be accessed through \fBKIO::SlaveBase::remoteEncoding\fP.
.PP
\fBAuthor:\fP
.RS 4
Thiago Macieira <thiago.macieira@kdemail.net> 
.RE
.PP
\fBSince:\fP
.RS 4
3.3 
.RE
.PP

.PP
Definition at line 44 of file kremoteencoding.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KRemoteEncoding::KRemoteEncoding (const char * name = \fC0L\fP)\fC [explicit]\fP"
.PP
Constructor. 
.PP
Constructs this object to use the given encoding name. If \fCname\fP is a null pointer, the standard encoding will be used. 
.PP
Definition at line 25 of file kremoteencoding.cpp.
.PP
References setEncoding().
.SS "KRemoteEncoding::~\fBKRemoteEncoding\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.PP
Definition at line 31 of file kremoteencoding.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBQString\fP KRemoteEncoding::decode (const \fBQCString\fP & name) const"
.PP
Converts the given full pathname or filename to Unicode. 
.PP
This function is supposed to work for dirnames, filenames or a full pathname. 
.PP
Definition at line 36 of file kremoteencoding.cpp.
.PP
References QString::fromLatin1(), QTextCodec::fromUnicode(), KStringHandler::isUtf8(), QTextCodec::mibEnum(), and QTextCodec::toUnicode().
.SS "\fBQCString\fP KRemoteEncoding::encode (const \fBQString\fP & name) const"
.PP
Converts the given name from Unicode. 
.PP
This function is supposed to work for dirnames, filenames or a full pathname. 
.PP
Definition at line 51 of file kremoteencoding.cpp.
.PP
References QTextCodec::fromUnicode(), QString::latin1(), and QTextCodec::toUnicode().
.PP
Referenced by directory(), encode(), and fileName().
.SS "\fBQCString\fP KRemoteEncoding::encode (const \fBKURL\fP & url) const"
.PP
Converts the given URL into its 8-bit components. 
.PP
Definition at line 60 of file kremoteencoding.cpp.
.PP
References encode().
.SS "\fBQCString\fP KRemoteEncoding::directory (const \fBKURL\fP & url, bool ignore_trailing_slash = \fCtrue\fP) const"
.PP
Converts the given URL into 8-bit form and separate the dirname from the filename. 
.PP
This is useful for slave functions like stat or get.
.PP
The dirname is returned with the final slash always stripped 
.PP
Definition at line 65 of file kremoteencoding.cpp.
.PP
References encode().
.SS "\fBQCString\fP KRemoteEncoding::fileName (const \fBKURL\fP & url) const"
.PP
Converts the given URL into 8-bit form and retrieve the filename. 
.PP
Definition at line 72 of file kremoteencoding.cpp.
.PP
References encode().
.SS "const char* KRemoteEncoding::encoding () const\fC [inline]\fP"
.PP
Returns the encoding being used. 
.PP
Definition at line 96 of file kremoteencoding.h.
.SS "void KRemoteEncoding::setEncoding (const char * name)"
.PP
Sets the encoding being used. 
.PP
This function does not change the global configuration.
.PP
Pass a null pointer in \fCname\fP to revert to the standard encoding. 
.PP
Definition at line 77 of file kremoteencoding.cpp.
.PP
References QTextCodec::codecForMib(), QTextCodec::codecForName(), endl(), k_funcinfo, kdDebug(), and QTextCodec::name().
.PP
Referenced by KRemoteEncoding().

.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
