mirror of
https://github.com/aaru-dps/aaruremote.git
synced 2025-12-16 19:24:37 +00:00
Separate list devices for Linux.
This commit is contained in:
@@ -3,4 +3,10 @@ project(dicremote C)
|
||||
|
||||
set(CMAKE_C_STANDARD 90)
|
||||
|
||||
add_executable(dicremote main.c list_devices.c)
|
||||
set(PLATFORM_SOURCES )
|
||||
|
||||
IF("${CMAKE_SYSTEM}" MATCHES "Linux")
|
||||
list(APPEND PLATFORM_SOURCES linux/list_devices.c linux/linux.h)
|
||||
endif()
|
||||
|
||||
add_executable(dicremote main.c list_devices.c ${PLATFORM_SOURCES})
|
||||
25
linux/linux.h
Normal file
25
linux/linux.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* This file is part of the DiscImageChef Remote Server.
|
||||
* Copyright (c) 2019 Natalia Portillo.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef DICREMOTE_LINUX_H
|
||||
#define DICREMOTE_LINUX_H
|
||||
|
||||
#include "../dicmote.h"
|
||||
|
||||
DeviceInfoList* linux_list_devices();
|
||||
|
||||
#endif // DICREMOTE_LINUX_H
|
||||
23
linux/list_devices.c
Normal file
23
linux/list_devices.c
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* This file is part of the DiscImageChef Remote Server.
|
||||
* Copyright (c) 2019 Natalia Portillo.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../dicmote.h"
|
||||
|
||||
DeviceInfoList* linux_list_devices()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -17,7 +17,15 @@
|
||||
|
||||
#include "dicmote.h"
|
||||
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
#include "linux/linux.h"
|
||||
#endif
|
||||
|
||||
DeviceInfoList* ListDevices()
|
||||
{
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
return linux_list_devices();
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
Reference in New Issue
Block a user