• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeutils API Reference
  • KDE Home
  • Contact Us
 

kremotecontrol

  • sources
  • kde-4.12
  • kdeutils
  • kremotecontrol
  • libkremotecontrol
  • backends
  • lirc
lircclient.h
Go to the documentation of this file.
1 /*************************************************************************
2  * Copyright : (C) 2002 by Gav Wood <gav@kde.org> *
3  * *
4  * This program is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU General Public License as *
6  * published by the Free Software Foundation; either version 2 of *
7  * the License or (at your option) version 3 or any later version *
8  * accepted by the membership of KDE e.V. (or its successor approved *
9  * by the membership of KDE e.V.), which shall act as a proxy *
10  * defined in Section 14 of version 3 of the license. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
19  *************************************************************************/
20 
21 #ifndef LIRCCLIENT_H
22 #define LIRCCLIENT_H
23 
24 #include <QObject>
25 #include <QMap>
26 #include <QStringList>
27 
28 class QLocalSocket;
29 class QSocketNotifier;
30 
37 class LircClient: public QObject
38 {
39  Q_OBJECT
40 
41 private:
42  QLocalSocket *theSocket;
43  QSocketNotifier *theNotifier;
44  QMap<QString, QStringList> theRemotes;
45 
46  void updateRemotes();
47  void sendCommand(const QString &command);
48  const QString readLine();
49 
50 private slots:
51  void slotRead();
52  void slotClosed();
53 
54 signals:
58  void newRemoteList(const QStringList &remoteList);
59 
71  void commandReceived(const QString &remote, const QString &button, int repeatCounter);
72 
76  void connectionClosed();
77 
78 public:
84  static LircClient *self();
85 
91  bool isConnected() const;
92 
98  const QStringList remotes() const;
99 
105  const QStringList buttons(const QString &theRemote) const;
106 
112  bool connectToLirc();
113 
114  LircClient();
115 
116  ~LircClient();
117 };
118 
119 #endif
LircClient::~LircClient
~LircClient()
Definition: lircclient.cpp:101
LircClient::buttons
const QStringList buttons(const QString &theRemote) const
Retrieve list of buttons of a praticular remote control.
Definition: lircclient.cpp:119
LircClient::commandReceived
void commandReceived(const QString &remote, const QString &button, int repeatCounter)
Emitted when a IR command was received.
QObject
LircClient
Definition: lircclient.h:37
LircClient::LircClient
LircClient()
Definition: lircclient.cpp:53
LircClient::connectionClosed
void connectionClosed()
Emitted when the Lirc connection is closed.
LircClient::connectToLirc
bool connectToLirc()
Connects to lirc.
Definition: lircclient.cpp:61
LircClient::remotes
const QStringList remotes() const
Retrieve list of remote controls.
Definition: lircclient.cpp:114
LircClient::isConnected
bool isConnected() const
Query status of connection.
Definition: lircclient.cpp:220
LircClient::newRemoteList
void newRemoteList(const QStringList &remoteList)
Emitted when the list of controls / buttons was changed by lircd (SIGHUP)
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:43 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kremotecontrol

Skip menu "kremotecontrol"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

Search



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