<commit_before>#ifndef TOHOLED_DBUS_H
#define TOHOLED_DBUS_H

#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QtDBus/QtDBus>

#include <QTime>
#include <QThread>
#include "oled.h"
#include "worker.h"

#define SERVICE_NAME "com.kimmoli.toholed"




/* main class */

class Toholed: public QObject
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", SERVICE_NAME)

public:
    Toholed();

    ~Toholed()
    {
        worker->abort();
        thread->wait();
        delete thread;
        delete worker;
    }

public slots:
    QString testIcons(const QString &arg);
    QString setVddState(const QString &arg);
    QString enableOled(const QString &arg);
    QString disableOled(const QString &arg);
    QString setOledContrast(const QString &arg);
    QString kill(const QString &arg);
    QString setScreenCaptureOnProximity(const QString &arg);

    /* interrupts */
    QString setInterruptEnable(const QString &arg);
    void handleGpioInterrupt();
    void handleProxInterrupt();

    /* dBus Signal handlers */
    void handleSMS(const QDBusMessage& msg);
    void handleDisplayStatus(const QDBusMessage& msg);
    void handleNotificationClosed(const QDBusMessage& msg);
    void handleCall(const QDBusMessage& msg);
    void handleTweetian(const QDBusMessage& msg);
    void handleCommuni(const QDBusMessage& msg);
    void handleActiveSync(const QDBusMessage& msg);
    void handleNotificationActionInvoked(const QDBusMessage& msg);

private slots:
    void timerTimeout();<commit_msg>Limit dbus visible functions<commit_after>#ifndef TOHOLED_DBUS_H
#define TOHOLED_DBUS_H

#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QtDBus/QtDBus>

#include <QTime>
#include <QThread>
#include "oled.h"
#include "worker.h"

#define SERVICE_NAME "com.kimmoli.toholed"




/* main class */

class Toholed: public QObject
{
    Q_OBJECT
    Q_CLASSINFO("D-Bus Interface", SERVICE_NAME)

public:
    Toholed();

    ~Toholed()
    {
        worker->abort();
        thread->wait();
        delete thread;
        delete worker;
    }

public slots:
    QString testIcons(const QString &arg);
    QString setScreenCaptureOnProximity(const QString &arg);

private slots:
    QString setVddState(const QString &arg);
    QString enableOled(const QString &arg);
    QString disableOled(const QString &arg);
    QString setOledContrast(const QString &arg);
    QString kill(const QString &arg);


    /* interrupts */
    QString setInterruptEnable(const QString &arg);
    void handleGpioInterrupt();
    void handleProxInterrupt();

    /* dBus Signal handlers */
    void handleSMS(const QDBusMessage& msg);
    void handleDisplayStatus(const QDBusMessage& msg);
    void handleNotificationClosed(const QDBusMessage& msg);
    void handleCall(const QDBusMessage& msg);
    void handleTweetian(const QDBusMessage& msg);
    void handleCommuni(const QDBusMessage& msg);
    void handleActiveSync(const QDBusMessage& msg);
    void handleNotificationActionInvoked(const QDBusMessage& msg);

    void timerTimeout();
{'fraction_non_alphanumeric': 0.10036315615714757, 'fraction_numerical': 0.0, 'mean_word_length': 4.066889632107023, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2803089', 'n_tokens_mistral': 975, 'n_tokens_neox': 974, 'n_words': 238}