Refactor: move media detection to own header

This commit is contained in:
Linus Dierheimer
2022-07-26 18:15:45 +02:00
parent 676485ef74
commit 298bc10e5f
5 changed files with 23 additions and 13 deletions
+1
View File
@@ -1,4 +1,5 @@
#include "fastfetch.h"
#include "detection/media.h"
#include <string.h>
#include <pthread.h>
+20
View File
@@ -0,0 +1,20 @@
#pragma once
#ifndef FF_INCLUDED_detection_media
#define FF_INCLUDED_detection_media
#include "fastfetch.h"
typedef struct FFMediaResult
{
FFstrbuf busNameShort; //e.g. plasma-browser-integration
FFstrbuf player; // e.g. Google Chrome
FFstrbuf song;
FFstrbuf artist;
FFstrbuf album;
FFstrbuf url;
} FFMediaResult;
const FFMediaResult* ffDetectMedia(FFinstance* instance);
#endif
-13
View File
@@ -189,16 +189,6 @@ typedef struct FFVulkanResult
FFlist devices; //List of FFGPUResult
} FFVulkanResult;
typedef struct FFMediaResult
{
FFstrbuf busNameShort; //e.g. plasma-browser-integration
FFstrbuf player; // e.g. Google Chrome
FFstrbuf song;
FFstrbuf artist;
FFstrbuf album;
FFstrbuf url;
} FFMediaResult;
//////////////////////
// Init functions //
//////////////////////
@@ -226,9 +216,6 @@ void ffLogoBuiltinListAutocompletion();
// Detection functions //
/////////////////////////
//detection/media.c
const FFMediaResult* ffDetectMedia(FFinstance* instance);
//detection/vulkan.c
const FFVulkanResult* ffDetectVulkan(const FFinstance* instance);
+1
View File
@@ -1,5 +1,6 @@
#include "fastfetch.h"
#include "common/printing.h"
#include "detection/media.h"
#include <ctype.h>
+1
View File
@@ -1,5 +1,6 @@
#include "fastfetch.h"
#include "common/printing.h"
#include "detection/media.h"
#include <ctype.h>