• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

qgpgme

  • qgpgme
eventloopinteractor_unix.cpp
1/* qeventloopinteractor.cpp
2 Copyright (C) 2003, 2007 Klarälvdalens Datakonsult AB
3
4 This file is part of QGPGME.
5
6 QGPGME is free software; you can redistribute it and/or modify it
7 under the terms of the GNU Library General Public License as published
8 by the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 QGPGME is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with QGPGME; see the file COPYING.LIB. If not, write to the
18 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA. */
20
21// -*- c++ -*-
22
23#include <qgpgme/eventloopinteractor.h>
24
25#include <QSocketNotifier>
26
27void * QGpgME::EventLoopInteractor::registerWatcher( int fd, Direction dir, bool & ok ) {
28 QSocketNotifier * const sn = new QSocketNotifier( fd, dir == Read ? QSocketNotifier::Read : QSocketNotifier::Write );
29 if ( dir == Read ) {
30 connect( sn, SIGNAL(activated(int)), this, SLOT(slotReadActivity(int)) );
31 } else {
32 connect( sn, SIGNAL(activated(int)), this, SLOT(slotWriteActivity(int)) );
33 }
34 ok = true; // Can above operations fails?
35 return sn;
36}
37
38void QGpgME::EventLoopInteractor::unregisterWatcher( void * tag ) {
39 static_cast<QSocketNotifier*>( tag )->deleteLater();
40}
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

qgpgme

Skip menu "qgpgme"
  • Main Page
  • File List

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal