• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeio/tdeio
 

tdeio/tdeio

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
KRemoteEncoding Class Reference

#include <kremoteencoding.h>

Public Member Functions

 KRemoteEncoding (const char *name=0L)
 
virtual ~KRemoteEncoding ()
 
TQString decode (const TQCString &name) const
 
TQCString encode (const TQString &name) const
 
TQCString encode (const KURL &url) const
 
TQCString directory (const KURL &url, bool ignore_trailing_slash=true) const
 
TQCString fileName (const KURL &url) const
 
const char * encoding () const
 
int encodingMib () const
 
void setEncoding (const char *name)
 

Protected Member Functions

virtual void virtual_hook (int id, void *data)
 

Protected Attributes

TQTextCodec * codec
 

Detailed Description

Allows encoding and decoding properly remote filenames into Unicode.

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 TDEIO::UDSEntry. The same is true for decoding URLs to its components.

Each TDEIO::SlaveBase has one object of this kind, even if it is not necessary. It can be accessed through TDEIO::SlaveBase::remoteEncoding.

A class for handling remote filenames

Author
Thiago Macieira thiag.nosp@m.o.ma.nosp@m.cieir.nosp@m.a@kd.nosp@m.email.nosp@m..net
Since
3.3

Definition at line 44 of file kremoteencoding.h.

Constructor & Destructor Documentation

◆ KRemoteEncoding()

KRemoteEncoding::KRemoteEncoding ( const char *  name = 0L)
explicit

Constructor.

Constructs this object to use the given encoding name. If name is a null pointer, the standard encoding will be used.

Definition at line 25 of file kremoteencoding.cpp.

◆ ~KRemoteEncoding()

KRemoteEncoding::~KRemoteEncoding ( )
virtual

Destructor.

Definition at line 31 of file kremoteencoding.cpp.

Member Function Documentation

◆ decode()

TQString KRemoteEncoding::decode ( const TQCString &  name) const

Converts the given full pathname or filename to Unicode.

This function is supposed to work for dirnames, filenames or a full pathname.

Definition at line 36 of file kremoteencoding.cpp.

◆ directory()

TQCString KRemoteEncoding::directory ( const KURL &  url,
bool  ignore_trailing_slash = true 
) const

Converts the given URL into 8-bit form and separate the dirname from the filename.

This is useful for slave functions like stat or get.

The dirname is returned with the final slash always stripped

Definition at line 65 of file kremoteencoding.cpp.

◆ encode() [1/2]

TQCString KRemoteEncoding::encode ( const KURL &  url) const

Converts the given URL into its 8-bit components.

Definition at line 60 of file kremoteencoding.cpp.

◆ encode() [2/2]

TQCString KRemoteEncoding::encode ( const TQString &  name) const

Converts the given name from Unicode.

This function is supposed to work for dirnames, filenames or a full pathname.

Definition at line 51 of file kremoteencoding.cpp.

◆ encoding()

const char* KRemoteEncoding::encoding ( ) const
inline

Returns the encoding being used.

Definition at line 96 of file kremoteencoding.h.

◆ encodingMib()

int KRemoteEncoding::encodingMib ( ) const
inline

Returns the MIB for the codec being used.

Definition at line 102 of file kremoteencoding.h.

◆ fileName()

TQCString KRemoteEncoding::fileName ( const KURL &  url) const

Converts the given URL into 8-bit form and retrieve the filename.

Definition at line 72 of file kremoteencoding.cpp.

◆ setEncoding()

void KRemoteEncoding::setEncoding ( const char *  name)

Sets the encoding being used.

This function does not change the global configuration.

Pass a null pointer in name to revert to the standard encoding.

Definition at line 77 of file kremoteencoding.cpp.


The documentation for this class was generated from the following files:
  • kremoteencoding.h
  • kremoteencoding.cpp

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeio/tdeio

Skip menu "tdeio/tdeio"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeio/tdeio by doxygen 1.9.1
This website is maintained by Timothy Pearson.