Refactor: move networking functions to own header

This commit is contained in:
Linus Dierheimer
2022-07-25 14:48:59 +02:00
parent 4c7b7e4a4d
commit 6e0d76a2fb
6 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
#include "fastfetch.h"
#include "common/caching.h"
#include "common/io.h"
#include "common/printing.h"
#include "common/caching.h"
#include <stdlib.h>
+1
View File
@@ -1,4 +1,5 @@
#include "fastfetch.h"
#include "common/networking.h"
#include <unistd.h>
#include <sys/socket.h>
+10
View File
@@ -0,0 +1,10 @@
#pragma once
#ifndef FF_INCLUDED_common_networking
#define FF_INCLUDED_common_networking
#include "util/FFstrbuf.h"
void ffNetworkingGetHttp(const char* host, const char* path, uint32_t timeout, FFstrbuf* buffer);
#endif
+1
View File
@@ -1,4 +1,5 @@
#include "fastfetch.h"
#include "common/processing.h"
#include "common/io.h"
#include <stdlib.h>
-3
View File
@@ -324,9 +324,6 @@ void ffListFeatures();
//common/threading.c
void ffStartDetectionThreads(FFinstance* instance);
//common/networking.c
void ffNetworkingGetHttp(const char* host, const char* path, uint32_t timeout, FFstrbuf* buffer);
////////////////////
// Logo functions //
////////////////////
+1
View File
@@ -1,5 +1,6 @@
#include "fastfetch.h"
#include "common/printing.h"
#include "common/networking.h"
#define FF_PUBLICIP_MODULE_NAME "Public IP"
#define FF_PUBLICIP_NUM_FORMAT_ARGS 1