[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Active objects, threads, signals & slots
From:       Adriaan de Groot <adridg () sci ! kun ! nl>
Date:       2002-11-06 8:20:33
[Download RAW message or body]

On Wed, 6 Nov 2002, Michael Schuerig wrote:
> I'm dealing with a library where calls can take some time (reading data
> from a mobile phone) and I need to poll in and endless loop (waiting
> for incoming SMS messages).

Is this with a serial / USB cable or some other nifty thing? KPilot does
something similar - waiting for incoming HotSync connections on a serial
or USB port - and the basic code structure is:

- open the port
- attach a QSocketNotifier
- connect a slot to QSocketNotifier's data-is-available signal
- the slot can read from the port and do the necessary processing.


See kdepim/kpilot/lib/kpilotlink.{h,c*} for concrete code.


-- 
+------------------------------+--------------------------------------------+
+ Adriaan de Groot             + Project: FRESCoS                           +
+ adridg@cs.kun.nl             + Private: adridg@sci.kun.nl                 +
+ Kamer A6020 tel. 024 3652272 + http://www.cs.kun.nl/~adridg/frescos/      +

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic