Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / libkopete / clientiface.h
blob83d63a12a4cc857595062e35005ee5cad4f880f9
1 #ifndef KDED_NETWORKSTATUS_CLIENTIFACE_H
2 #define KDED_NETWORKSTATUS_CLIENTIFACE_H
4 #include "networkstatuscommon.h"
6 #include <dcopobject.h>
8 class ClientIface : virtual public DCOPObject
10 K_DCOP
11 k_dcop:
12 /** Get the set of networks that the daemon is aware of. Mostly for debug */
13 virtual QStringList networks() = 0;
14 /**
15 * Get the status of the connection to the given host.
16 * @param host
17 * @return a NetworkStatus::EnumStatus representing the state of the connection to the given host
19 virtual int status( const QString & host = QString() ) = 0;
20 /**
21 * Request a connection to the named host, registering the application's usage of this connection
22 * @param host The hostname the client wants to connect to.
23 * @param userInitiated Indicates whether the connection is a direct result of a user action or is a background task. Used by the daemon to decide whether to create an on-demand connection.
24 * @return An NetworkStatus::EnumRequestResult indicating whether the request was accepted
26 virtual int request( const QString & host, bool userInitiated ) = 0;
27 /**
28 * Indicate that a previously registered connection to the given host is no longer needed by this client
29 * @param host The hostname being relinquished.
31 virtual void relinquish( const QString & host ) = 0;
32 /**
33 * Indicate that a communication failure has occurred for a given host
34 * @param host The hostname for which the failure occurred.
35 * @return True indicates the caller should try again to lookup the host, as the daemon has another IP address available.
37 virtual bool reportFailure( const QString & host ) = 0;
38 /**
39 * Utility method to check the daemon's status
41 k_dcop_signals:
42 /**
43 * A status change occurred for the network(s) used to connect to the given host.
44 * @param host The host which the application has indicated it is using
45 * @param status The new status of the network used to reach host.
47 void statusChange( QString host, int status );
48 /**
49 * The network would like to shut down - any clients using this host are to finish using it immediately and call
50 * relinquish() when done.
51 * @param host The host, registered as in use by applications, which is about to be disconnected.
53 void shutdownRequested( QString host );
56 #endif