feat(Tray): handle item unregister
This commit is contained in:
@ -5,24 +5,25 @@
|
||||
|
||||
namespace waybar::modules::SNI {
|
||||
|
||||
typedef enum {
|
||||
GF_WATCH_TYPE_HOST,
|
||||
GF_WATCH_TYPE_ITEM
|
||||
} GfWatchType;
|
||||
|
||||
typedef struct {
|
||||
GfWatchType type;
|
||||
gchar* service;
|
||||
gchar* bus_name;
|
||||
gchar* object_path;
|
||||
guint watch_id;
|
||||
} GfWatch;
|
||||
|
||||
class Watcher {
|
||||
public:
|
||||
Watcher();
|
||||
~Watcher();
|
||||
private:
|
||||
typedef enum {
|
||||
GF_WATCH_TYPE_HOST,
|
||||
GF_WATCH_TYPE_ITEM
|
||||
} GfWatchType;
|
||||
|
||||
typedef struct {
|
||||
GfWatchType type;
|
||||
Watcher* watcher;
|
||||
gchar* service;
|
||||
gchar* bus_name;
|
||||
gchar* object_path;
|
||||
guint watch_id;
|
||||
} GfWatch;
|
||||
|
||||
static void busAcquired(GDBusConnection*, const gchar*, gpointer);
|
||||
static gboolean handleRegisterHost(Watcher*,
|
||||
GDBusMethodInvocation*, const gchar*);
|
||||
@ -30,8 +31,8 @@ class Watcher {
|
||||
GDBusMethodInvocation*, const gchar*);
|
||||
static GfWatch* gfWatchFind(GSList* list, const gchar* bus_name,
|
||||
const gchar* object_path);
|
||||
static GfWatch* gfWatchNew(GfWatchType type,
|
||||
const gchar* service, const gchar* bus_name, const gchar* object_path);
|
||||
static GfWatch* gfWatchNew(GfWatchType, const gchar*, const gchar*,
|
||||
const gchar*, Watcher*);
|
||||
static void nameVanished(GDBusConnection* connection, const char* name,
|
||||
gpointer data);
|
||||
|
||||
|
Reference in New Issue
Block a user