| 1 | /* |
| 2 | * Copyright 2014 Canonical Ltd. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU Lesser General Public License as published by |
| 6 | * the Free Software Foundation; version 3. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU Lesser General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU Lesser General Public License |
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 15 | */ |
| 16 | |
| 17 | #ifndef UNIXSIGNALHANDLER_P_H |
| 18 | #define UNIXSIGNALHANDLER_P_Hcxx . . $ `src/LomiriToolkit/unixsignalhandler_p.h:18:9`! |
| 19 | |
| 20 | #include <signal.h> |
| 21 | |
| 22 | #include <QtCore/QHash> |
| 23 | #include <QtCore/QObject> |
| 24 | |
| 25 | #if QT_VERSIONcxx . . $ `<external>/15045578679651060896/qglobal.h:57:9`! >= QT_VERSION_CHECKcxx . . $ `<external>/15045578679651060896/qglobal.h:61:9`!(6, 0, 0) |
| 26 | #include <LomiriToolkit-Qt6/lomiritoolkitglobal.h> |
| 27 | #else |
| 28 | #include <LomiriToolkit/lomiritoolkitglobal.h>cxx . . $ `<file>/include/LomiriToolkit/lomiritoolkitglobal.h`/ |
| 29 | #endif |
| 30 | |
| 31 | class QSocketNotifiercxx . . $ QSocketNotifier#; |
| 32 | |
| 33 | UT_NAMESPACE_BEGINcxx . . $ `src/LomiriToolkit/lomiritoolkitglobal.h:52:9`! |
| 34 | |
| 35 | class UnixSignalHandlercxx . . $ UnixSignalHandler# : public QObjectcxx . . $ QObject# |
| 36 | { |
| 37 | Q_OBJECTcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:170:9`! |
| 38 | public: |
| 39 | enum SignalTypecxx . . $ UnixSignalHandler#SignalType# { |
| 40 | Invalidcxx . . $ UnixSignalHandler#Invalid. = 0, |
| 41 | Interruptcxx . . $ UnixSignalHandler#Interrupt. = SIGINTcxx . . $ `<external>/11773118241360591791/signum-generic.h:48:9`!, |
| 42 | Terminatecxx . . $ UnixSignalHandler#Terminate. = SIGTERMcxx . . $ `<external>/11773118241360591791/signum-generic.h:53:9`! |
| 43 | }; |
| 44 | |
| 45 | typedef QPaircxx . . $ QPair#<stdcxx . . $ std/::arraycxx . . $ std/array#<int, 2>, QSocketNotifiercxx . . $ QSocketNotifier#*> HandlerTypecxx . . $ UnixSignalHandler#HandlerType#; |
| 46 | |
| 47 | static UnixSignalHandlercxx . . $ UnixSignalHandler# &instancecxx . . $ UnixSignalHandler#instance(adeac52cbe346a4b).() |
| 48 | { |
| 49 | static UnixSignalHandlercxx . . $ UnixSignalHandler# instancecxx . . $ UnixSignalHandler#UnixSignalHandler(749de1b6ae65bddd).; |
| 50 | return instance; |
| 51 | } |
| 52 | |
| 53 | void connectSignalcxx . . $ UnixSignalHandler#connectSignal(c8f0eca90ef09da1).(SignalTypecxx . . $ UnixSignalHandler#SignalType# type); |
| 54 | |
| 55 | Q_SIGNALScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:93:10`!: |
| 56 | void signalTriggeredcxx . . $ UnixSignalHandler#signalTriggered(d4f767463ce0a6b3).(int type); |
| 57 | |
| 58 | private Q_SLOTScxx . . $ `<external>/1208926524888476972/qobjectdefs.h:92:10`!: |
| 59 | void notifierActivatedcxx . . $ UnixSignalHandler#notifierActivated(d4f767463ce0a6b3).(int socket); |
| 60 | private: |
| 61 | explicit UnixSignalHandlercxx . . $ UnixSignalHandler#UnixSignalHandler(749de1b6ae65bddd).(QObjectcxx . . $ QObject# *parent = 0); |
| 62 | |
| 63 | static void signalHookcxx . . $ UnixSignalHandler#signalHook(d4f767463ce0a6b3).(int); |
| 64 | HandlerTypecxx . . $ UnixSignalHandler#HandlerType# createHandlercxx . . $ UnixSignalHandler#createHandler(b7df4cbcfdcda23).(int signal); |
| 65 | |
| 66 | QHashcxx . . $ QHash#<SignalTypecxx . . $ UnixSignalHandler#SignalType#, HandlerTypecxx . . $ UnixSignalHandler#HandlerType#> notifierscxx . . $ UnixSignalHandler#notifiers.; |
| 67 | QHashcxx . . $ QHash#<int, SignalTypecxx . . $ UnixSignalHandler#SignalType#> socketRegistercxx . . $ UnixSignalHandler#socketRegister.; |
| 68 | }; |
| 69 | |
| 70 | UT_NAMESPACE_ENDcxx . . $ `src/LomiriToolkit/lomiritoolkitglobal.h:53:9`! |
| 71 | |
| 72 | #endif // UNIXSIGNALHANDLER_P_H |