project_files/frontlib/ipc/gameconn.h
author unc0rr
Mon, 06 Feb 2017 18:15:29 +0300
changeset 12149 44b06731278b
parent 10017 de822cd3df3a
permissions -rw-r--r--
Fix handlers module
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10017
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
     1
/*
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
     2
 * Hedgewars, a free turn based strategy game
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
     3
 * Copyright (C) 2012 Simeon Maxein <smaxein@googlemail.com>
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
     4
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
     5
 * This program is free software; you can redistribute it and/or
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
     6
 * modify it under the terms of the GNU General Public License
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
     7
 * as published by the Free Software Foundation; either version 2
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
     8
 * of the License, or (at your option) any later version.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
     9
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    10
 * This program is distributed in the hope that it will be useful,
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    13
 * GNU General Public License for more details.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    14
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    15
 * You should have received a copy of the GNU General Public License
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    16
 * along with this program; if not, write to the Free Software
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    18
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    19
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    20
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    21
 * This file contains functions for starting and interacting with a game run by the engine.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    22
 * The general usage is to first create a gameconn object by calling one of the flib_gameconn_create
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    23
 * functions. That will cause the frontlib to listen on a random port which can be queried using
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    24
 * flib_gameconn_getport(). You should also register your callback functions right at the start
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    25
 * to ensure you don't miss any callbacks.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    26
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    27
 * Next, start the engine (that part is up to you) with the appropriate command line arguments
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    28
 * for starting a game.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    29
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    30
 * In order to allow the gameconn to run, you should regularly call flib_gameconn_tick(), which
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    31
 * performs network I/O and calls your callbacks on interesting events.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    32
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    33
 * Once the engine connects, the gameconn will send it the required commands for starting the
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    34
 * game you requested in your flib_gameconn_create call.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    35
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    36
 * When the game is finished (or the connection is lost), you will receive the onDisconnect
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    37
 * message. This is the signal to destroy the gameconn and stop calling tick().
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    38
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    39
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    40
#ifndef GAMECONN_H_
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    41
#define GAMECONN_H_
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    42
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    43
#include "../model/gamesetup.h"
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    44
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    45
#include <stddef.h>
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    46
#include <stdint.h>
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    47
#include <stdbool.h>
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    48
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    49
/*
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    50
 * Different reasons for a disconnect. Only GAME_END_FINISHED signals a correctly completed game.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    51
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    52
#define GAME_END_FINISHED 0
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    53
#define GAME_END_INTERRUPTED 1
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    54
#define GAME_END_HALTED 2
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    55
#define GAME_END_ERROR 3
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    56
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    57
typedef struct _flib_gameconn flib_gameconn;
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    58
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    59
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    60
 * Create a gameconn that will start a local or network game with the indicated configuration.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    61
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    62
flib_gameconn *flib_gameconn_create(const char *playerName, const flib_gamesetup *setup, bool netgame);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    63
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    64
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    65
 * Create a gameconn that will play back a demo.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    66
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    67
flib_gameconn *flib_gameconn_create_playdemo(const uint8_t *demoFileContent, size_t size);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    68
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    69
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    70
 * Create a gameconn that will continue from a saved game.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    71
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    72
flib_gameconn *flib_gameconn_create_loadgame(const char *playerName, const uint8_t *saveFileContent, size_t size);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    73
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    74
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    75
 * Create a gameconn that will start a campaign or training mission with the indicated script.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    76
 * seed is the random seed to use as entropy source (any string).
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    77
 * script is the path and filename of a Campaign or Training script, relative to the Data directory
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    78
 * (e.g. "Missions/Training/Basic_Training_-_Bazooka.lua")
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    79
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    80
flib_gameconn *flib_gameconn_create_campaign(const char *playerName, const char *seed, const char *script);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    81
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    82
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    83
 * Release all resources of this gameconn, including the network connection, and free its memory.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    84
 * It is safe to call this function from a callback.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    85
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    86
void flib_gameconn_destroy(flib_gameconn *conn);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    87
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    88
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    89
 * Returns the port on which the gameconn is listening. Only fails if you
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    90
 * pass NULL (not allowed), in that case 0 is returned.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    91
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    92
int flib_gameconn_getport(flib_gameconn *conn);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    93
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    94
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    95
 * Perform I/O operations and call callbacks if something interesting happens.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    96
 * Should be called regularly.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    97
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    98
void flib_gameconn_tick(flib_gameconn *conn);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
    99
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   100
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   101
 * Send an engine message to the engine. Only needed in net games, where you receive engine
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   102
 * messages from the server and have to pass them here.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   103
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   104
int flib_gameconn_send_enginemsg(flib_gameconn *conn, const uint8_t *data, size_t len);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   105
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   106
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   107
 * Send an info message to the engine that will be displayed in the game's chatlog.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   108
 * The msgtype determines the color of the message;  in the QTFrontend, info messages and
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   109
 * normal chat messages use 1, emote-messages (those starting with /me) use 2, and
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   110
 * join/leave messages use 3. You should use flib_gameconn_send_chatmsg for chat messages
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   111
 * though because it automatically formats /me messages.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   112
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   113
 * Generally only needed in net games.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   114
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   115
int flib_gameconn_send_textmsg(flib_gameconn *conn, int msgtype, const char *msg);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   116
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   117
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   118
 * Send a chat message to be displayed in the game's chatlog. Messages starting with /me are
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   119
 * automatically formatted correctly.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   120
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   121
 * Generally only needed in net games.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   122
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   123
int flib_gameconn_send_chatmsg(flib_gameconn *conn, const char *playername, const char *msg);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   124
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   125
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   126
 * Request the engine to stop the game (efinish).
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   127
 * You can use this to shut down a game early without directly killing the engine process.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   128
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   129
int flib_gameconn_send_quit(flib_gameconn *conn);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   130
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   131
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   132
 * Send an arbitrary command to the engine, e.g. "eforcequit" to shut down the engine
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   133
 * quickly. Commands prefixed with "e" will be processed by the engine's ProcessCommand
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   134
 * method (with the e removed, so e.g. efinish will be parsed as finish).
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   135
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   136
int flib_gameconn_send_cmd(flib_gameconn *conn, const char *cmdString);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   137
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   138
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   139
 * Expected callback signature: void handleConnect(void *context)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   140
 * The engine has successfully connected. You don't have to react to this in any way.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   141
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   142
void flib_gameconn_onConnect(flib_gameconn *conn, void (*callback)(void* context), void* context);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   143
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   144
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   145
 * Expected callback signature: void handleDisconnect(void *context, int reason)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   146
 * The connection to the engine was closed, either because the game has ended normally, or
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   147
 * because it was interrupted/halted, or because of an error. The reason is provided as one
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   148
 * of the GAME_END_xxx constants.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   149
 *
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   150
 * You should destroy the gameconn and - in a netgame - notify the server that the game has ended.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   151
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   152
void flib_gameconn_onDisconnect(flib_gameconn *conn, void (*callback)(void* context, int reason), void* context);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   153
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   154
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   155
 * Expected callback signature: void handleErrorMessage(void* context, const char *msg)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   156
 * The engine sent an error message, you should probably display it to the user or at least log it.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   157
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   158
void flib_gameconn_onErrorMessage(flib_gameconn *conn, void (*callback)(void* context, const char *msg), void* context);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   159
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   160
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   161
 * Expected callback signature: void handleChat(void* context, const char *msg, bool teamchat)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   162
 * The player entered a chat or teamchat message. In a netgame, you should send it on to the server.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   163
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   164
void flib_gameconn_onChat(flib_gameconn *conn, void (*callback)(void* context, const char *msg, bool teamchat), void* context);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   165
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   166
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   167
 * Expected callback signature: void handleGameRecorded(void *context, const uint8_t *record, size_t size, bool isSavegame)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   168
 * The game has stopped, and a demo or savegame is available. You can store it in a file and later pass it back
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   169
 * to the engine to either watch a replay (if it's a demo) or to continue playing (if it's a savegame).
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   170
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   171
void flib_gameconn_onGameRecorded(flib_gameconn *conn, void (*callback)(void *context, const uint8_t *record, size_t size, bool isSavegame), void* context);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   172
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   173
/**
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   174
 * Expected callback signature: void handleEngineMessage(void *context, const uint8_t *em, size_t size)
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   175
 * The engine has generated a message with player input. In a netgame, you should send it on to the server.
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   176
 */
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   177
void flib_gameconn_onEngineMessage(flib_gameconn *conn, void (*callback)(void *context, const uint8_t *em, size_t size), void* context);
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   178
de822cd3df3a fixwhitespace and dos2unix
koda
parents: 7576
diff changeset
   179
#endif