C# 클래스 KIO.SlaveBase

상속: Object, ISlaveBase
파일 보기 프로젝트 열기: 0xd34df00d/Qross

보호된 프로퍼티들

프로퍼티 타입 설명
interceptor Qyoto.SmokeInvocation

공개 메소드들

메소드 설명
AllMetaData ( ) : KIO.MetaData Contains all metadata (but no config) sent by the application to the slave.
CacheAuthentication ( KIO info ) : bool Explicitly store authentication information. openPasswordDialog already stores password information automatically, you only need to call this function if you want to store authentication information that is different from the information returned by openPasswordDialog.
CanResume ( long offset ) : bool Call this at the beginning of put(), to give the size of the existing partial file, if there is one. The offset argument notifies the other job (the one that gets the data) about the offset to use. In this case, the boolean returns whether we can indeed resume or not (we can't if the protocol doing the get() doesn't support setting an offset)
CanResume ( ) : void Call this at the beginning of get(), if the "resume" metadata was set and resuming is implemented by this protocol.
CheckCachedAuthentication ( KIO info ) : bool Checks for cached authentication based on parameters given by info. Use this function to check if any cached password exists for the URL given by info. If AuthInfo.RealmValue and/or AuthInfo.VerifyPath flag is specified, then they will also be factored in determining the presence of a cached password. Note that Auth.Url is a required parameter when attempting to check for cached authorization info. Here is a simple example:
 AuthInfo info; info.url = KUrl("http://www.foobar.org/foo/bar"); info.username = "somename"; info.verifyPath = true; if ( !checkCachedAuthentication( info ) ) { if ( !openPasswordDialog(info) ) .... } 
name="info" See AuthInfo.
Config ( ) : Kimono.KConfigGroup Returns a configuration object to query config/meta-data information from. The application provides the slave with all configuration information relevant for the current protocol and host.
ConnectSlave ( string path ) : void internal function to connect a slave to/ disconnect from either the slave pool or the application
ConnectTimeout ( ) : int
Connected ( ) : void Call in openConnection, if you reimplement it, when you're done.
Data ( Qyoto.QByteArray data ) : void Sends data in the slave to the job (i.e. in get). To signal end of data, simply send an empty QByteArray(). name="data" the data read by the slave
DataReq ( ) : void Asks for data from the job.
DisconnectSlave ( ) : void
DispatchLoop ( ) : void
DropNetwork ( ) : void
DropNetwork ( string host ) : void Used by the slave to withdraw a connection requested by requestNetwork. This function cancels the last call to requestNetwork. If a client uses more than one internet connection, it must use dropNetwork(host) to stop each request. If KNetMgr is not running, then this is a no-op. name="host" the host passed to requestNetwork A slave should call this function every time it disconnect from a host.
ErrorPage ( ) : void Tell that we will only get an error page here. This means: the data you'll get isn't the data you requested, but an error page (usually HTML) that describes an error.
Exit ( ) : void Terminate the slave by calling the destructor and then .Exit()
Finished ( ) : void Call to signal successful completion of any command besides openConnection and closeConnection. Do not call this after calling error().
HasMetaData ( string key ) : bool Queries for the existence of a certain config/meta-data entry send by the application to the slave.
InfoMessage ( string msg ) : void Call to signal a message, to be displayed if the application wants to, for instance in a status bar. Usual examples are "connecting to host xyz", etc.
ListEntries ( List _entry ) : void Call this in listDir, each time you have a bunch of entries to report. name="_entry" The UDSEntry containing all of the object attributes.
ListEntry ( KIO _entry, bool ready ) : void internal function to be called by the slave. It collects entries and emits them via listEntries when enough of them are there or a certain time frame exceeded (to make sure the app gets some items in time but not too many items one by one as this will cause a drastic performance penalty) name="_entry" The UDSEntry containing all of the object attributes. name="ready" set to true after emitting all items. _entry is not used in this case
LookupHost ( string host ) : void Internally used
MessageBox ( KIO type, string text ) : int
MessageBox ( KIO type, string text, string caption ) : int
MessageBox ( KIO type, string text, string caption, string buttonYes ) : int
MessageBox ( KIO type, string text, string caption, string buttonYes, string buttonNo ) : int Call this to show a message box from the slave name="type" type of message box: QuestionYesNo, WarningYesNo, WarningContinueCancel... name="text" Message string. May contain newlines. name="caption" Message box title. name="buttonYes" The text for the first button. The default is i18n("&Yes"). name="buttonNo" The text for the second button. The default is i18n("&No"). Note: for ContinueCancel, buttonYes is the continue button and buttonNo is unused. and for Information, none is used.
MessageBox ( string text, KIO type ) : int
MessageBox ( string text, KIO type, string caption ) : int
MessageBox ( string text, KIO type, string caption, string buttonYes ) : int
MessageBox ( string text, KIO type, string caption, string buttonYes, string buttonNo ) : int
MessageBox ( string text, KIO type, string caption, string buttonYes, string buttonNo, string dontAskAgainName ) : int Call this to show a message box from the slave name="text" Message string. May contain newlines. name="type" type of message box: QuestionYesNo, WarningYesNo, WarningContinueCancel... name="caption" Message box title. name="buttonYes" The text for the first button. The default is i18n("&Yes"). name="buttonNo" The text for the second button. The default is i18n("&No"). Note: for ContinueCancel, buttonYes is the continue button and buttonNo is unused. and for Information, none is used. name="dontAskAgain" A checkbox is added with which further confirmation can be turned off. If the checkbox was ticked @pdontAskAgain will be set to true, otherwise false.
MetaData ( string key ) : string Queries for config/meta-data send by the application to the slave.
MimeType ( string _type ) : void Call this in mimetype() and in get(), when you know the mimetype. See mimetype about other ways to implement it.
NeedSubUrlData ( ) : void Call to signal that data from the sub-URL is needed
OpenPasswordDialog ( KIO info ) : bool
OpenPasswordDialog ( KIO info, string errorMsg ) : bool Prompt the user for Authorization info (login & password). Use this function to request authorization information from the end user. You can also pass an error message which explains why a previous authorization attempt failed. Here is a very simple example:
 KIO.AuthInfo authInfo; if ( openPasswordDialog( authInfo ) ) { kDebug() << QLatin1String("User: ") << authInfo.username << endl; kDebug() << QLatin1String("Password: ") << QLatin1String("Not displayed here!") << endl; } 
You can also preset some values like the username, caption or comment as follows:
 KIO.AuthInfo authInfo; authInfo.caption= "Acme Password Dialog"; authInfo.username= "Wile E. Coyote"; string errorMsg = "You entered an incorrect password."; if ( openPasswordDialog( authInfo, errorMsg ) ) { kDebug() << QLatin1String("User: ") << authInfo.username << endl; kDebug() << QLatin1String("Password: ") << QLatin1String("Not displayed here!") << endl; } 
Note:<> You should consider using checkCachedAuthentication() to see if the password is available in kpasswdserver before calling this function. Note:<> A call to this function can fail and return false, if the UIServer could not be started for whatever reason. name="info" See AuthInfo. name="errorMsg" Error message to show
Opened ( ) : void open succedes
Position ( long _pos ) : void
ProcessedPercent ( float percent ) : void Only use this if you can't know in advance the size of the copied data. For example, if you're doing variable bitrate compression of the source. STUB ! Currently unimplemented. Here now for binary compatibility. Call this during get and copy, once in a while, to give some info about the current state. Don't emit it in listDir, listEntries speaks for itself.
ProcessedSize ( long _bytes ) : void Call this during get and copy, once in a while, to give some info about the current state. Don't emit it in listDir, listEntries speaks for itself.
ProxyConnectTimeout ( ) : int
ReadData ( Qyoto.QByteArray buffer ) : int Read data sent by the job, after a dataReq name="buffer" buffer where data is stored
ReadTimeout ( ) : int
Redirection ( Kimono.KUrl _url ) : void Call this to signal a redirection The job will take care of going to that url.
RemoteEncoding ( ) : Kimono.KRemoteEncoding Returns an object that can translate remote filenames into proper Unicode forms. This encoding can be set by the user.
RequestNetwork ( ) : bool
RequestNetwork ( string host ) : bool Used by the slave to check if it can connect to a given host. This should be called where the slave is ready to do a .Connect() on a socket. For each call to requestNetwork must exist a matching call to dropNetwork, or the system will stay online until KNetMgr gets closed (or the SlaveBase gets destructed)! If KNetMgr is not running, then this is a no-op and returns true name="host" tells the netmgr the host the slave wants to connect to. As this could also be a proxy, we can't just take the host currenctly connected to (but that's the default value)
ResponseTimeout ( ) : int
SendAndKeepMetaData ( ) : void Internal function to transmit meta data to the application. Like sendMetaData() but m_outgoingMetaData will not be cleared. This method is mainly useful in code that runs before the slave is connected to its final job.
SendMetaData ( ) : void Internal function to transmit meta data to the application. m_outgoingMetaData will be cleared; this means that if the slave is for example put on hold and picked up by a different KIO.Job later the new job will not see the metadata sent before. See kio/DESIGN.krun for an overview of the state progression of a job/slave. @warning calling this method may seriously interfere with the operation of KIO which relies on the presence of some metadata at some points in time. You should not use it if you are not familiar with KIO and not before the slave is connected to the last job before returning to idle state.
SetKillFlag ( ) : void Internally used.
SetMetaData ( string key, string value ) : void Sets meta-data to be send to the application before the first data() or finished() signal.
SetTimeoutSpecialCommand ( int timeout ) : void
SetTimeoutSpecialCommand ( int timeout, Qyoto.QByteArray data ) : void This function sets a timeout of timeout seconds and calls special(data) when the timeout occurs as if it was called by the application. A timeout can only occur when the slave is waiting for a command from the application. Specifying a negative timeout cancels a pending timeout. Only one timeout at a time is supported, setting a timeout cancels any pending timeout.
SlaveBase ( Qyoto.QByteArray protocol, Qyoto.QByteArray pool_socket, Qyoto.QByteArray app_socket ) : System
SlaveStatus ( string host, bool connected ) : void Used to report the status of the slave. name="host" the slave is currently connected to. (Should be empty if not connected) name="connected" Whether an actual network connection exists.
Speed ( ulong _bytes_per_second ) : void Call this in get and copy, to give the current transfer speed, but only if it can't be calculated out of the size you passed to processedSize (in most cases you don't want to call it)
StatEntry ( KIO _entry ) : void Call this from stat() to express details about an object, the UDSEntry customarily contains the atoms describing file name, size, mimetype, etc. name="_entry" The UDSEntry containing all of the object attributes.
TotalSize ( long _bytes ) : void Call this in get and copy, to give the total size of the file Call in listDir too, when you know the total number of items.
WaitForAnswer ( int expected1, int expected2, Qyoto.QByteArray data ) : int
WaitForAnswer ( int expected1, int expected2, Qyoto.QByteArray data, int &pCmd ) : int Wait for an answer to our request, until we get expected1 or expected2
WaitForHostInfo ( Qyoto.QHostInfo info ) : int Internally used
Warning ( string msg ) : void Call to signal a warning, to be displayed in a dialog box.
WasKilled ( ) : bool If your ioslave was killed by a signal, wasKilled() returns true. Check it regularly in lengthy functions (e.g. in get();) and return as fast as possible from this function if wasKilled() returns true. This will ensure that your slave destructor will be called correctly.
Written ( long _bytes ) : void
error ( int _errid, string _text ) : void Call to signal an error. This also finishes the job, so you must not call finished() after calling this. If the error code is KIO.ERR_SLAVE_DEFINED then the _text should contain the complete translated text of of the error message. For all other error codes, _text should match the corresponding error code. Usually,, _text is a file or host name, or the error which was passed from the server.
For example, for KIO.ERR_DOES_NOT_EXIST, _text may only be the file or folder which does not exist, nothing else. Otherwise, this would break error strings generated by KIO.BuildErrorString().
If you have to add more details than what the standard error codes provide, you'll need to use KIO.ERR_SLAVE_DEFINED. For a complete list of what _text should contain for each error code, look at the source of KIO.BuildErrorString(). You can add rich text markup to the message, the places where the error message will be displayed are rich text aware. name="_errid" the error code from KIO.Error name="_text" the rich text error message

보호된 메소드들

메소드 설명
CreateProxy ( ) : void
SlaveBase ( Type dummy ) : System

비공개 메소드들

메소드 설명
Chmod ( Kimono.KUrl url, int permissions ) : void
Chown ( Kimono.KUrl url, string owner, string group ) : void
Close ( ) : void
CloseConnection ( ) : void
Copy ( Kimono.KUrl src, Kimono.KUrl dest, int permissions, uint flags ) : void
Del ( Kimono.KUrl url, bool isfile ) : void
Dispatch ( int command, Qyoto.QByteArray data ) : void
DispatchOpenCommand ( int command, Qyoto.QByteArray data ) : void
Get ( Kimono.KUrl url ) : void
ListDir ( Kimono.KUrl url ) : void
Mimetype ( Kimono.KUrl url ) : void
Mkdir ( Kimono.KUrl url, int permissions ) : void
MultiGet ( Qyoto.QByteArray data ) : void
Open ( Kimono.KUrl url, uint mode ) : void
OpenConnection ( ) : void
Put ( Kimono.KUrl url, int permissions, uint flags ) : void
Read ( long size ) : void
Rename ( Kimono.KUrl src, Kimono.KUrl dest, uint flags ) : void
ReparseConfiguration ( ) : void
Seek ( long offset ) : void
SetHost ( string host, ushort port, string user, string pass ) : void
SetLinkDest ( Kimono.KUrl url, string target ) : void
SetModificationTime ( Kimono.KUrl url, Qyoto.QDateTime mtime ) : void
SetSubUrl ( Kimono.KUrl url ) : void
Slave_status ( ) : void
Special ( Qyoto.QByteArray data ) : void
Stat ( Kimono.KUrl url ) : void
Symlink ( string target, Kimono.KUrl dest, uint flags ) : void
Write ( Qyoto.QByteArray data ) : void

메소드 상세

AllMetaData() 공개 메소드

Contains all metadata (but no config) sent by the application to the slave.
public AllMetaData ( ) : KIO.MetaData
리턴 KIO.MetaData

CacheAuthentication() 공개 메소드

Explicitly store authentication information. openPasswordDialog already stores password information automatically, you only need to call this function if you want to store authentication information that is different from the information returned by openPasswordDialog.
public CacheAuthentication ( KIO info ) : bool
info KIO
리턴 bool

CanResume() 공개 메소드

Call this at the beginning of put(), to give the size of the existing partial file, if there is one. The offset argument notifies the other job (the one that gets the data) about the offset to use. In this case, the boolean returns whether we can indeed resume or not (we can't if the protocol doing the get() doesn't support setting an offset)
public CanResume ( long offset ) : bool
offset long
리턴 bool

CanResume() 공개 메소드

Call this at the beginning of get(), if the "resume" metadata was set and resuming is implemented by this protocol.
public CanResume ( ) : void
리턴 void

CheckCachedAuthentication() 공개 메소드

Checks for cached authentication based on parameters given by info. Use this function to check if any cached password exists for the URL given by info. If AuthInfo.RealmValue and/or AuthInfo.VerifyPath flag is specified, then they will also be factored in determining the presence of a cached password. Note that Auth.Url is a required parameter when attempting to check for cached authorization info. Here is a simple example:
 AuthInfo info; info.url = KUrl("http://www.foobar.org/foo/bar"); info.username = "somename"; info.verifyPath = true; if ( !checkCachedAuthentication( info ) ) { if ( !openPasswordDialog(info) ) .... } 
name="info" See AuthInfo.
public CheckCachedAuthentication ( KIO info ) : bool
info KIO
리턴 bool

Config() 공개 메소드

Returns a configuration object to query config/meta-data information from. The application provides the slave with all configuration information relevant for the current protocol and host.
public Config ( ) : Kimono.KConfigGroup
리턴 Kimono.KConfigGroup

ConnectSlave() 공개 메소드

internal function to connect a slave to/ disconnect from either the slave pool or the application
public ConnectSlave ( string path ) : void
path string
리턴 void

ConnectTimeout() 공개 메소드

public ConnectTimeout ( ) : int
리턴 int

Connected() 공개 메소드

Call in openConnection, if you reimplement it, when you're done.
public Connected ( ) : void
리턴 void

CreateProxy() 보호된 메소드

protected CreateProxy ( ) : void
리턴 void

Data() 공개 메소드

Sends data in the slave to the job (i.e. in get). To signal end of data, simply send an empty QByteArray(). name="data" the data read by the slave
public Data ( Qyoto.QByteArray data ) : void
data Qyoto.QByteArray
리턴 void

DataReq() 공개 메소드

Asks for data from the job.
public DataReq ( ) : void
리턴 void

DisconnectSlave() 공개 메소드

public DisconnectSlave ( ) : void
리턴 void

DispatchLoop() 공개 메소드

public DispatchLoop ( ) : void
리턴 void

DropNetwork() 공개 메소드

public DropNetwork ( ) : void
리턴 void

DropNetwork() 공개 메소드

Used by the slave to withdraw a connection requested by requestNetwork. This function cancels the last call to requestNetwork. If a client uses more than one internet connection, it must use dropNetwork(host) to stop each request. If KNetMgr is not running, then this is a no-op. name="host" the host passed to requestNetwork A slave should call this function every time it disconnect from a host.
public DropNetwork ( string host ) : void
host string
리턴 void

ErrorPage() 공개 메소드

Tell that we will only get an error page here. This means: the data you'll get isn't the data you requested, but an error page (usually HTML) that describes an error.
public ErrorPage ( ) : void
리턴 void

Exit() 공개 메소드

Terminate the slave by calling the destructor and then .Exit()
public Exit ( ) : void
리턴 void

Finished() 공개 메소드

Call to signal successful completion of any command besides openConnection and closeConnection. Do not call this after calling error().
public Finished ( ) : void
리턴 void

HasMetaData() 공개 메소드

Queries for the existence of a certain config/meta-data entry send by the application to the slave.
public HasMetaData ( string key ) : bool
key string
리턴 bool

InfoMessage() 공개 메소드

Call to signal a message, to be displayed if the application wants to, for instance in a status bar. Usual examples are "connecting to host xyz", etc.
public InfoMessage ( string msg ) : void
msg string
리턴 void

ListEntries() 공개 메소드

Call this in listDir, each time you have a bunch of entries to report. name="_entry" The UDSEntry containing all of the object attributes.
public ListEntries ( List _entry ) : void
_entry List
리턴 void

ListEntry() 공개 메소드

internal function to be called by the slave. It collects entries and emits them via listEntries when enough of them are there or a certain time frame exceeded (to make sure the app gets some items in time but not too many items one by one as this will cause a drastic performance penalty) name="_entry" The UDSEntry containing all of the object attributes. name="ready" set to true after emitting all items. _entry is not used in this case
public ListEntry ( KIO _entry, bool ready ) : void
_entry KIO
ready bool
리턴 void

LookupHost() 공개 메소드

Internally used
public LookupHost ( string host ) : void
host string
리턴 void

MessageBox() 공개 메소드

public MessageBox ( KIO type, string text ) : int
type KIO
text string
리턴 int

MessageBox() 공개 메소드

public MessageBox ( KIO type, string text, string caption ) : int
type KIO
text string
caption string
리턴 int

MessageBox() 공개 메소드

public MessageBox ( KIO type, string text, string caption, string buttonYes ) : int
type KIO
text string
caption string
buttonYes string
리턴 int

MessageBox() 공개 메소드

Call this to show a message box from the slave name="type" type of message box: QuestionYesNo, WarningYesNo, WarningContinueCancel... name="text" Message string. May contain newlines. name="caption" Message box title. name="buttonYes" The text for the first button. The default is i18n("&Yes"). name="buttonNo" The text for the second button. The default is i18n("&No"). Note: for ContinueCancel, buttonYes is the continue button and buttonNo is unused. and for Information, none is used.
public MessageBox ( KIO type, string text, string caption, string buttonYes, string buttonNo ) : int
type KIO
text string
caption string
buttonYes string
buttonNo string
리턴 int

MessageBox() 공개 메소드

public MessageBox ( string text, KIO type ) : int
text string
type KIO
리턴 int

MessageBox() 공개 메소드

public MessageBox ( string text, KIO type, string caption ) : int
text string
type KIO
caption string
리턴 int

MessageBox() 공개 메소드

public MessageBox ( string text, KIO type, string caption, string buttonYes ) : int
text string
type KIO
caption string
buttonYes string
리턴 int

MessageBox() 공개 메소드

public MessageBox ( string text, KIO type, string caption, string buttonYes, string buttonNo ) : int
text string
type KIO
caption string
buttonYes string
buttonNo string
리턴 int

MessageBox() 공개 메소드

Call this to show a message box from the slave name="text" Message string. May contain newlines. name="type" type of message box: QuestionYesNo, WarningYesNo, WarningContinueCancel... name="caption" Message box title. name="buttonYes" The text for the first button. The default is i18n("&Yes"). name="buttonNo" The text for the second button. The default is i18n("&No"). Note: for ContinueCancel, buttonYes is the continue button and buttonNo is unused. and for Information, none is used. name="dontAskAgain" A checkbox is added with which further confirmation can be turned off. If the checkbox was ticked @pdontAskAgain will be set to true, otherwise false.
public MessageBox ( string text, KIO type, string caption, string buttonYes, string buttonNo, string dontAskAgainName ) : int
text string
type KIO
caption string
buttonYes string
buttonNo string
dontAskAgainName string
리턴 int

MetaData() 공개 메소드

Queries for config/meta-data send by the application to the slave.
public MetaData ( string key ) : string
key string
리턴 string

MimeType() 공개 메소드

Call this in mimetype() and in get(), when you know the mimetype. See mimetype about other ways to implement it.
public MimeType ( string _type ) : void
_type string
리턴 void

NeedSubUrlData() 공개 메소드

Call to signal that data from the sub-URL is needed
public NeedSubUrlData ( ) : void
리턴 void

OpenPasswordDialog() 공개 메소드

public OpenPasswordDialog ( KIO info ) : bool
info KIO
리턴 bool

OpenPasswordDialog() 공개 메소드

Prompt the user for Authorization info (login & password). Use this function to request authorization information from the end user. You can also pass an error message which explains why a previous authorization attempt failed. Here is a very simple example:
 KIO.AuthInfo authInfo; if ( openPasswordDialog( authInfo ) ) { kDebug() << QLatin1String("User: ") << authInfo.username << endl; kDebug() << QLatin1String("Password: ") << QLatin1String("Not displayed here!") << endl; } 
You can also preset some values like the username, caption or comment as follows:
 KIO.AuthInfo authInfo; authInfo.caption= "Acme Password Dialog"; authInfo.username= "Wile E. Coyote"; string errorMsg = "You entered an incorrect password."; if ( openPasswordDialog( authInfo, errorMsg ) ) { kDebug() << QLatin1String("User: ") << authInfo.username << endl; kDebug() << QLatin1String("Password: ") << QLatin1String("Not displayed here!") << endl; } 
Note:<> You should consider using checkCachedAuthentication() to see if the password is available in kpasswdserver before calling this function. Note:<> A call to this function can fail and return false, if the UIServer could not be started for whatever reason. name="info" See AuthInfo. name="errorMsg" Error message to show
public OpenPasswordDialog ( KIO info, string errorMsg ) : bool
info KIO
errorMsg string
리턴 bool

Opened() 공개 메소드

open succedes
public Opened ( ) : void
리턴 void

Position() 공개 메소드

public Position ( long _pos ) : void
_pos long
리턴 void

ProcessedPercent() 공개 메소드

Only use this if you can't know in advance the size of the copied data. For example, if you're doing variable bitrate compression of the source. STUB ! Currently unimplemented. Here now for binary compatibility. Call this during get and copy, once in a while, to give some info about the current state. Don't emit it in listDir, listEntries speaks for itself.
public ProcessedPercent ( float percent ) : void
percent float
리턴 void

ProcessedSize() 공개 메소드

Call this during get and copy, once in a while, to give some info about the current state. Don't emit it in listDir, listEntries speaks for itself.
public ProcessedSize ( long _bytes ) : void
_bytes long
리턴 void

ProxyConnectTimeout() 공개 메소드

public ProxyConnectTimeout ( ) : int
리턴 int

ReadData() 공개 메소드

Read data sent by the job, after a dataReq name="buffer" buffer where data is stored
public ReadData ( Qyoto.QByteArray buffer ) : int
buffer Qyoto.QByteArray
리턴 int

ReadTimeout() 공개 메소드

public ReadTimeout ( ) : int
리턴 int

Redirection() 공개 메소드

Call this to signal a redirection The job will take care of going to that url.
public Redirection ( Kimono.KUrl _url ) : void
_url Kimono.KUrl
리턴 void

RemoteEncoding() 공개 메소드

Returns an object that can translate remote filenames into proper Unicode forms. This encoding can be set by the user.
public RemoteEncoding ( ) : Kimono.KRemoteEncoding
리턴 Kimono.KRemoteEncoding

RequestNetwork() 공개 메소드

public RequestNetwork ( ) : bool
리턴 bool

RequestNetwork() 공개 메소드

Used by the slave to check if it can connect to a given host. This should be called where the slave is ready to do a .Connect() on a socket. For each call to requestNetwork must exist a matching call to dropNetwork, or the system will stay online until KNetMgr gets closed (or the SlaveBase gets destructed)! If KNetMgr is not running, then this is a no-op and returns true name="host" tells the netmgr the host the slave wants to connect to. As this could also be a proxy, we can't just take the host currenctly connected to (but that's the default value)
public RequestNetwork ( string host ) : bool
host string
리턴 bool

ResponseTimeout() 공개 메소드

public ResponseTimeout ( ) : int
리턴 int

SendAndKeepMetaData() 공개 메소드

Internal function to transmit meta data to the application. Like sendMetaData() but m_outgoingMetaData will not be cleared. This method is mainly useful in code that runs before the slave is connected to its final job.
public SendAndKeepMetaData ( ) : void
리턴 void

SendMetaData() 공개 메소드

Internal function to transmit meta data to the application. m_outgoingMetaData will be cleared; this means that if the slave is for example put on hold and picked up by a different KIO.Job later the new job will not see the metadata sent before. See kio/DESIGN.krun for an overview of the state progression of a job/slave. @warning calling this method may seriously interfere with the operation of KIO which relies on the presence of some metadata at some points in time. You should not use it if you are not familiar with KIO and not before the slave is connected to the last job before returning to idle state.
public SendMetaData ( ) : void
리턴 void

SetKillFlag() 공개 메소드

Internally used.
public SetKillFlag ( ) : void
리턴 void

SetMetaData() 공개 메소드

Sets meta-data to be send to the application before the first data() or finished() signal.
public SetMetaData ( string key, string value ) : void
key string
value string
리턴 void

SetTimeoutSpecialCommand() 공개 메소드

public SetTimeoutSpecialCommand ( int timeout ) : void
timeout int
리턴 void

SetTimeoutSpecialCommand() 공개 메소드

This function sets a timeout of timeout seconds and calls special(data) when the timeout occurs as if it was called by the application. A timeout can only occur when the slave is waiting for a command from the application. Specifying a negative timeout cancels a pending timeout. Only one timeout at a time is supported, setting a timeout cancels any pending timeout.
public SetTimeoutSpecialCommand ( int timeout, Qyoto.QByteArray data ) : void
timeout int
data Qyoto.QByteArray
리턴 void

SlaveBase() 공개 메소드

public SlaveBase ( Qyoto.QByteArray protocol, Qyoto.QByteArray pool_socket, Qyoto.QByteArray app_socket ) : System
protocol Qyoto.QByteArray
pool_socket Qyoto.QByteArray
app_socket Qyoto.QByteArray
리턴 System

SlaveBase() 보호된 메소드

protected SlaveBase ( Type dummy ) : System
dummy System.Type
리턴 System

SlaveStatus() 공개 메소드

Used to report the status of the slave. name="host" the slave is currently connected to. (Should be empty if not connected) name="connected" Whether an actual network connection exists.
public SlaveStatus ( string host, bool connected ) : void
host string
connected bool
리턴 void

Speed() 공개 메소드

Call this in get and copy, to give the current transfer speed, but only if it can't be calculated out of the size you passed to processedSize (in most cases you don't want to call it)
public Speed ( ulong _bytes_per_second ) : void
_bytes_per_second ulong
리턴 void

StatEntry() 공개 메소드

Call this from stat() to express details about an object, the UDSEntry customarily contains the atoms describing file name, size, mimetype, etc. name="_entry" The UDSEntry containing all of the object attributes.
public StatEntry ( KIO _entry ) : void
_entry KIO
리턴 void

TotalSize() 공개 메소드

Call this in get and copy, to give the total size of the file Call in listDir too, when you know the total number of items.
public TotalSize ( long _bytes ) : void
_bytes long
리턴 void

WaitForAnswer() 공개 메소드

public WaitForAnswer ( int expected1, int expected2, Qyoto.QByteArray data ) : int
expected1 int
expected2 int
data Qyoto.QByteArray
리턴 int

WaitForAnswer() 공개 메소드

Wait for an answer to our request, until we get expected1 or expected2
public WaitForAnswer ( int expected1, int expected2, Qyoto.QByteArray data, int &pCmd ) : int
expected1 int
expected2 int
data Qyoto.QByteArray
pCmd int
리턴 int

WaitForHostInfo() 공개 메소드

Internally used
public WaitForHostInfo ( Qyoto.QHostInfo info ) : int
info Qyoto.QHostInfo
리턴 int

Warning() 공개 메소드

Call to signal a warning, to be displayed in a dialog box.
public Warning ( string msg ) : void
msg string
리턴 void

WasKilled() 공개 메소드

If your ioslave was killed by a signal, wasKilled() returns true. Check it regularly in lengthy functions (e.g. in get();) and return as fast as possible from this function if wasKilled() returns true. This will ensure that your slave destructor will be called correctly.
public WasKilled ( ) : bool
리턴 bool

Written() 공개 메소드

public Written ( long _bytes ) : void
_bytes long
리턴 void

error() 공개 메소드

Call to signal an error. This also finishes the job, so you must not call finished() after calling this. If the error code is KIO.ERR_SLAVE_DEFINED then the _text should contain the complete translated text of of the error message. For all other error codes, _text should match the corresponding error code. Usually,, _text is a file or host name, or the error which was passed from the server.
For example, for KIO.ERR_DOES_NOT_EXIST, _text may only be the file or folder which does not exist, nothing else. Otherwise, this would break error strings generated by KIO.BuildErrorString().
If you have to add more details than what the standard error codes provide, you'll need to use KIO.ERR_SLAVE_DEFINED. For a complete list of what _text should contain for each error code, look at the source of KIO.BuildErrorString(). You can add rich text markup to the message, the places where the error message will be displayed are rich text aware. name="_errid" the error code from KIO.Error name="_text" the rich text error message
public error ( int _errid, string _text ) : void
_errid int
_text string
리턴 void

프로퍼티 상세

interceptor 보호되어 있는 프로퍼티

protected SmokeInvocation,Qyoto interceptor
리턴 Qyoto.SmokeInvocation