1*1b464e99SMatthias Ringwald /* 2*1b464e99SMatthias Ringwald * Copyright (C) 2019 BlueKitchen GmbH 3*1b464e99SMatthias Ringwald * 4*1b464e99SMatthias Ringwald * Redistribution and use in source and binary forms, with or without 5*1b464e99SMatthias Ringwald * modification, are permitted provided that the following conditions 6*1b464e99SMatthias Ringwald * are met: 7*1b464e99SMatthias Ringwald * 8*1b464e99SMatthias Ringwald * 1. Redistributions of source code must retain the above copyright 9*1b464e99SMatthias Ringwald * notice, this list of conditions and the following disclaimer. 10*1b464e99SMatthias Ringwald * 2. Redistributions in binary form must reproduce the above copyright 11*1b464e99SMatthias Ringwald * notice, this list of conditions and the following disclaimer in the 12*1b464e99SMatthias Ringwald * documentation and/or other materials provided with the distribution. 13*1b464e99SMatthias Ringwald * 3. Neither the name of the copyright holders nor the names of 14*1b464e99SMatthias Ringwald * contributors may be used to endorse or promote products derived 15*1b464e99SMatthias Ringwald * from this software without specific prior written permission. 16*1b464e99SMatthias Ringwald * 4. Any redistribution, use, or modification is done solely for 17*1b464e99SMatthias Ringwald * personal benefit and not for any commercial purpose or for 18*1b464e99SMatthias Ringwald * monetary gain. 19*1b464e99SMatthias Ringwald * 20*1b464e99SMatthias Ringwald * THIS SOFTWARE IS PROVIDED BY BLUEKITCHEN GMBH AND CONTRIBUTORS 21*1b464e99SMatthias Ringwald * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22*1b464e99SMatthias Ringwald * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 23*1b464e99SMatthias Ringwald * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MATTHIAS 24*1b464e99SMatthias Ringwald * RINGWALD OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 25*1b464e99SMatthias Ringwald * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 26*1b464e99SMatthias Ringwald * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 27*1b464e99SMatthias Ringwald * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 28*1b464e99SMatthias Ringwald * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29*1b464e99SMatthias Ringwald * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 30*1b464e99SMatthias Ringwald * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31*1b464e99SMatthias Ringwald * SUCH DAMAGE. 32*1b464e99SMatthias Ringwald * 33*1b464e99SMatthias Ringwald * Please inquire about commercial licensing options at 34*1b464e99SMatthias Ringwald * [email protected] 35*1b464e99SMatthias Ringwald * 36*1b464e99SMatthias Ringwald */ 37*1b464e99SMatthias Ringwald 38*1b464e99SMatthias Ringwald /* 39*1b464e99SMatthias Ringwald * btstack_run_loop_qt.h 40*1b464e99SMatthias Ringwald * Functionality special to the Qt event loop 41*1b464e99SMatthias Ringwald */ 42*1b464e99SMatthias Ringwald 43*1b464e99SMatthias Ringwald #ifndef btstack_run_loop_QT_H 44*1b464e99SMatthias Ringwald #define btstack_run_loop_QT_H 45*1b464e99SMatthias Ringwald 46*1b464e99SMatthias Ringwald #include "btstack_run_loop.h" 47*1b464e99SMatthias Ringwald 48*1b464e99SMatthias Ringwald // BTstack Run Loop Object for Qt integration 49*1b464e99SMatthias Ringwald #if defined __cplusplus 50*1b464e99SMatthias Ringwald #include <QObject> 51*1b464e99SMatthias Ringwald #include <QTimer> 52*1b464e99SMatthias Ringwald class BTstackRunLoopQt : public QObject { 53*1b464e99SMatthias Ringwald Q_OBJECT 54*1b464e99SMatthias Ringwald public slots: 55*1b464e99SMatthias Ringwald void processTimers(void); 56*1b464e99SMatthias Ringwald }; 57*1b464e99SMatthias Ringwald #endif 58*1b464e99SMatthias Ringwald 59*1b464e99SMatthias Ringwald #if defined __cplusplus 60*1b464e99SMatthias Ringwald extern "C" { 61*1b464e99SMatthias Ringwald #endif 62*1b464e99SMatthias Ringwald 63*1b464e99SMatthias Ringwald /** 64*1b464e99SMatthias Ringwald * Provide btstack_run_loop_qt instance 65*1b464e99SMatthias Ringwald */ 66*1b464e99SMatthias Ringwald const btstack_run_loop_t * btstack_run_loop_qt_get_instance(void); 67*1b464e99SMatthias Ringwald 68*1b464e99SMatthias Ringwald /* API_END */ 69*1b464e99SMatthias Ringwald 70*1b464e99SMatthias Ringwald #if defined __cplusplus 71*1b464e99SMatthias Ringwald } 72*1b464e99SMatthias Ringwald #endif 73*1b464e99SMatthias Ringwald 74*1b464e99SMatthias Ringwald #endif // btstack_run_loop_QT_H 75