2012-07-28 07:47:35 +02:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 01:50:59 +01:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2016-01-10 04:06:50 +01:00
|
|
|
* Copyright (C) 2011-2016 - Daniel De Matteis
|
2012-07-28 07:47:35 +02:00
|
|
|
*
|
|
|
|
* RetroArch 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 Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch 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 RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-04-13 11:39:40 +02:00
|
|
|
#ifndef COMMAND_H__
|
|
|
|
#define COMMAND_H__
|
2012-07-28 07:47:35 +02:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2014-10-21 05:05:52 +02:00
|
|
|
#include <boolean.h>
|
2012-07-28 07:47:35 +02:00
|
|
|
|
2013-04-21 10:05:12 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2016-05-09 20:10:08 +02:00
|
|
|
typedef struct command command_t;
|
2012-07-28 07:47:35 +02:00
|
|
|
|
2016-05-09 20:10:08 +02:00
|
|
|
typedef struct command_handle
|
2016-03-04 17:35:44 +01:00
|
|
|
{
|
2016-05-09 20:10:08 +02:00
|
|
|
command_t *handle;
|
2016-03-04 17:35:44 +01:00
|
|
|
unsigned id;
|
2016-05-09 20:10:08 +02:00
|
|
|
} command_handle_t;
|
2016-03-04 17:35:44 +01:00
|
|
|
|
2016-05-09 20:10:08 +02:00
|
|
|
command_t *command_new(bool stdin_enable,
|
2014-09-02 05:10:54 +02:00
|
|
|
bool network_enable, uint16_t port);
|
|
|
|
|
2016-05-08 00:25:04 +02:00
|
|
|
#if defined(HAVE_NETWORK_CMD) && defined(HAVE_NETPLAY)
|
2016-05-09 20:10:08 +02:00
|
|
|
bool command_send(const char *cmd_);
|
2016-05-08 00:25:04 +02:00
|
|
|
#endif
|
|
|
|
|
2016-05-09 20:10:08 +02:00
|
|
|
bool command_poll(command_t *handle);
|
2016-05-08 00:25:04 +02:00
|
|
|
|
2016-05-09 20:10:08 +02:00
|
|
|
bool command_set(command_handle_t *handle);
|
2016-05-08 00:25:04 +02:00
|
|
|
|
2016-05-09 20:10:08 +02:00
|
|
|
bool command_get(command_handle_t *handle);
|
2016-05-08 00:25:04 +02:00
|
|
|
|
2016-05-09 20:10:08 +02:00
|
|
|
bool command_free(command_t *handle);
|
2016-02-13 07:19:21 +01:00
|
|
|
|
2013-04-21 10:05:12 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2012-07-28 07:47:35 +02:00
|
|
|
#endif
|
|
|
|
|