summaryrefslogtreecommitdiffstats
path: root/kppp/KPPPIface.h
blob: 2b5a6cb503b676049045f2a8beba22a2c6058fe1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef KPPPIFACE_H
#define KPPPIFACE_H

#include <dcopobject.h>

/* IMPORTANT: when using the aboutToDisconnect signal bear in mind that

    - if pppd dies, aboutToDisconnect will never be emitted because the
      connection is already dead by the time kppp knows about it.
      disconnected() will be emitted regardless of the cause of
      disconnection.

    - during a normal disconnection aboutToDisconnect will be emitted 
      shortly before disconnection, but in systems under heavy load there's 
      no warranty that the signal will be delivered to the applications 
      before the disconnection is performed. DCOP works this way, 
      sorry.

*/

class KpppIface : virtual public DCOPObject
{
  K_DCOP

  k_dcop:
    virtual void beginConnect() = 0;
    virtual void disconnect() = 0;
    virtual bool isConnected() const = 0;
    
  k_dcop_signals:
    
    void aboutToConnect();
    void connected();
    void aboutToDisconnect();	// see the note above
    void disconnected();

};

#endif