Finish uncrustifying
This commit is contained in:
parent
bdf518f37f
commit
9bded1b722
@ -67,6 +67,7 @@ typedef struct _ConfigData {
|
||||
|
||||
extern ConfigData *active_config;
|
||||
|
||||
gboolean wmud_config_init(ConfigData **config_data, GError **err);
|
||||
gboolean wmud_config_init(ConfigData **config_data,
|
||||
GError **err);
|
||||
|
||||
#endif /* __WMUD_CONFIGURATION_H__ */
|
||||
|
32
wmud/db.h
32
wmud/db.h
@ -43,16 +43,26 @@ typedef enum {
|
||||
|
||||
gboolean wmud_db_init(GError **err);
|
||||
gboolean wmud_db_load_players(GError **err);
|
||||
gboolean wmud_db_save_player(WmudPlayer *player, GError **err);
|
||||
gboolean wmud_db_load_planes(GSList **planes, GError **err);
|
||||
gboolean wmud_db_load_planets(GSList **planets, GError **err);
|
||||
gboolean wmud_db_load_directions(GSList **directions, GError **err);
|
||||
gboolean wmud_db_load_areas(GSList **areas, GError **err);
|
||||
gboolean wmud_db_load_rooms(GSList **rooms, GError **err);
|
||||
gboolean wmud_db_load_exits(GSList **exits, GError **err);
|
||||
gboolean wmud_db_load_planet_planes(GSList **planet_planes, GError **err);
|
||||
gboolean wmud_db_load_menu(GSList **menu_items, GError **err);
|
||||
gboolean wmud_db_update_player_password(WmudPlayer *player, gchar *crypted_password, GError **err);
|
||||
gboolean wmud_db_save_player(WmudPlayer *player,
|
||||
GError **err);
|
||||
gboolean wmud_db_load_planes(GSList **planes,
|
||||
GError **err);
|
||||
gboolean wmud_db_load_planets(GSList **planets,
|
||||
GError **err);
|
||||
gboolean wmud_db_load_directions(GSList **directions,
|
||||
GError **err);
|
||||
gboolean wmud_db_load_areas(GSList **areas,
|
||||
GError **err);
|
||||
gboolean wmud_db_load_rooms(GSList **rooms,
|
||||
GError **err);
|
||||
gboolean wmud_db_load_exits(GSList **exits,
|
||||
GError **err);
|
||||
gboolean wmud_db_load_planet_planes(GSList **planet_planes,
|
||||
GError **err);
|
||||
gboolean wmud_db_load_menu(GSList **menu_items,
|
||||
GError **err);
|
||||
gboolean wmud_db_update_player_password(WmudPlayer *player,
|
||||
gchar *crypted_password,
|
||||
GError **err);
|
||||
|
||||
#endif /* __WMUD__DB_H__ */
|
||||
|
||||
|
@ -62,8 +62,13 @@
|
||||
|
||||
extern GSList *clients;
|
||||
|
||||
gboolean wmud_networking_init(guint port_number, GMainContext *game_context, GSList *menu_items, GError **err);
|
||||
void wmud_client_quitanswer(WmudClient *client, gboolean answer);
|
||||
void wmud_client_newchar_answer(WmudClient *client, gboolean answer);
|
||||
gboolean wmud_networking_init(guint port_number,
|
||||
GMainContext *game_context,
|
||||
GSList *menu_items,
|
||||
GError **err);
|
||||
void wmud_client_quitanswer(WmudClient *client,
|
||||
gboolean answer);
|
||||
void wmud_client_newchar_answer(WmudClient *client,
|
||||
gboolean answer);
|
||||
|
||||
#endif
|
||||
|
@ -19,7 +19,7 @@
|
||||
#ifndef __WMUD_GAME_H__
|
||||
#define __WMUD_GAME_H__
|
||||
|
||||
gboolean wmud_game_init(GThread **game_thread, GMainContext **game_context);
|
||||
gboolean wmud_game_init(GThread **game_thread,
|
||||
GMainContext **game_context);
|
||||
|
||||
#endif /* __WMUD_GAME_H__ */
|
||||
|
||||
|
@ -58,8 +58,8 @@ typedef enum {
|
||||
WMUD_INTERPRETER_ERROR_DUPCMD
|
||||
} wmudInterpreterError;
|
||||
|
||||
gboolean wmud_interpreter_check_directions(GSList *directions, GError **err);
|
||||
gboolean wmud_interpreter_check_directions(GSList *directions,
|
||||
GError **err);
|
||||
void wmud_interpret_game_command(WmudClient *client);
|
||||
|
||||
#endif /* __WMUD_INTERPRETER_H__ */
|
||||
|
||||
|
@ -63,10 +63,13 @@ GSList *game_menu;
|
||||
#define WMUD_MENU_ERROR wmud_menu_error_quark()
|
||||
GQuark wmud_menu_error_quark();
|
||||
gboolean wmud_menu_init(GSList **menu);
|
||||
gboolean wmud_menu_items_check(GSList *menu_items, GError **err);
|
||||
gboolean wmud_menu_items_check(GSList *menu_items,
|
||||
GError **err);
|
||||
void wmud_menu_items_free(GSList **menu_items);
|
||||
gchar *wmud_menu_get_command_by_menuchar(gchar menuchar, GSList *game_menu);
|
||||
void wmud_menu_execute_command(WmudClient *client, gchar *command);
|
||||
gchar *wmud_menu_get_command_by_menuchar(gchar menuchar,
|
||||
GSList *game_menu);
|
||||
void wmud_menu_execute_command(WmudClient *client,
|
||||
gchar *command);
|
||||
void wmud_menu_present(WmudClient *client);
|
||||
|
||||
#endif /* __WMUD_MENU_H__ */
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "wmudclient.h"
|
||||
|
||||
void wmud_texts_init(void);
|
||||
void wmud_text_send_to_client(gchar *text, WmudClient *client);
|
||||
void wmud_text_send_to_client(gchar *text,
|
||||
WmudClient *client);
|
||||
|
||||
#endif /* __WMUD_TEXTS_H__ */
|
||||
|
@ -50,39 +50,47 @@ typedef struct _WmudClientPrivate WmudClientPrivate;
|
||||
*/
|
||||
typedef void (*WmudClientYesnoCallback)(WmudClient *client, gboolean answer);
|
||||
|
||||
struct _WmudClient
|
||||
{
|
||||
struct _WmudClient {
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
WmudClientPrivate *priv;
|
||||
};
|
||||
|
||||
struct _WmudClientClass
|
||||
{
|
||||
struct _WmudClientClass {
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
GType wmud_client_get_type(void);
|
||||
WmudClient *wmud_client_new(void);
|
||||
void wmud_client_set_socket(WmudClient *client, GSocket *socket);
|
||||
void wmud_client_set_socket(WmudClient *client,
|
||||
GSocket *socket);
|
||||
GSocket *wmud_client_get_socket(WmudClient *client);
|
||||
GSource *wmud_client_get_socket_source(WmudClient *client);
|
||||
void wmud_client_send(WmudClient *client, const gchar *fmt, ...);
|
||||
void wmud_client_close(WmudClient *self, gboolean send_goodbye);
|
||||
void wmud_client_send(WmudClient *client,
|
||||
const gchar *fmt,
|
||||
...);
|
||||
void wmud_client_close(WmudClient *self,
|
||||
gboolean send_goodbye);
|
||||
GString *wmud_client_get_buffer(WmudClient *client);
|
||||
gsize wmud_client_get_buffer_length(WmudClient *client);
|
||||
void wmud_client_set_state(WmudClient *client, WmudClientState state);
|
||||
void wmud_client_set_state(WmudClient *client,
|
||||
WmudClientState state);
|
||||
WmudClientState wmud_client_get_state(WmudClient *client);
|
||||
void wmud_client_set_player(WmudClient *client, WmudPlayer *player);
|
||||
void wmud_client_set_player(WmudClient *client,
|
||||
WmudPlayer *player);
|
||||
WmudPlayer *wmud_client_get_player(WmudClient *client);
|
||||
void wmud_client_set_yesno_callback(WmudClient *client, WmudClientYesnoCallback yesno_callback);
|
||||
void wmud_client_set_yesno_callback(WmudClient *client,
|
||||
WmudClientYesnoCallback yesno_callback);
|
||||
WmudClientYesnoCallback wmud_client_get_yesno_callback(WmudClient *client);
|
||||
void wmud_client_set_authenticated(WmudClient *client, gboolean authenticated);
|
||||
void wmud_client_set_authenticated(WmudClient *client,
|
||||
gboolean authenticated);
|
||||
void wmud_client_increase_login_fail_count(WmudClient *client);
|
||||
gint wmud_client_get_login_fail_count(WmudClient *client);
|
||||
void wmud_client_set_bademail(WmudClient *client, gboolean bademail);
|
||||
void wmud_client_set_bademail(WmudClient *client,
|
||||
gboolean bademail);
|
||||
gboolean wmud_client_get_bademail(WmudClient *client);
|
||||
guint32 wmud_client_get_last_recv_age(WmudClient *client);
|
||||
void wmud_client_set_context(WmudClient *client, GMainContext *context);
|
||||
void wmud_client_set_context(WmudClient *client,
|
||||
GMainContext *context);
|
||||
|
||||
#endif /* __WMUD_WMUDCLIENT_H__ */
|
||||
|
@ -37,4 +37,3 @@ typedef enum {
|
||||
} WmudClientState;
|
||||
|
||||
#endif /* __WMUD_CLIENT_STATE_H__ */
|
||||
|
||||
|
@ -34,8 +34,7 @@ typedef struct _WmudPlayer WmudPlayer;
|
||||
typedef struct _WmudPlayerClass WmudPlayerClass;
|
||||
typedef struct _WmudPlayerPrivate WmudPlayerPrivate;
|
||||
|
||||
struct _WmudPlayer
|
||||
{
|
||||
struct _WmudPlayer {
|
||||
/*< private >*/
|
||||
GObject parent_instance;
|
||||
|
||||
@ -43,28 +42,32 @@ struct _WmudPlayer
|
||||
WmudPlayerPrivate *priv;
|
||||
};
|
||||
|
||||
struct _WmudPlayerClass
|
||||
{
|
||||
struct _WmudPlayerClass {
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
GType wmud_player_get_type(void);
|
||||
WmudPlayer *wmud_player_new(void);
|
||||
void wmud_player_set_cpassword(WmudPlayer *player, const gchar *cpassword);
|
||||
void wmud_player_set_cpassword(WmudPlayer *player,
|
||||
const gchar *cpassword);
|
||||
gchar *wmud_player_get_cpassword(WmudPlayer *player);
|
||||
void wmud_player_set_registered(WmudPlayer *player, gboolean registered);
|
||||
void wmud_player_set_registered(WmudPlayer *player,
|
||||
gboolean registered);
|
||||
gboolean wmud_player_get_registered(WmudPlayer *player);
|
||||
void wmud_player_set_player_name(WmudPlayer *player, const gchar *name);
|
||||
void wmud_player_set_player_name(WmudPlayer *player,
|
||||
const gchar *name);
|
||||
gchar *wmud_player_get_player_name(WmudPlayer *player);
|
||||
gint wmud_player_get_fail_count(WmudPlayer *player);
|
||||
void wmud_player_increase_fail_count(WmudPlayer *player);
|
||||
void wmud_player_reset_fail_count(WmudPlayer *player);
|
||||
void wmud_player_set_email(WmudPlayer *player, const gchar *email);
|
||||
void wmud_player_set_email(WmudPlayer *player,
|
||||
const gchar *email);
|
||||
gchar *wmud_player_get_email(WmudPlayer *player);
|
||||
void wmud_player_set_id(WmudPlayer *player, guint32 id);
|
||||
void wmud_player_set_id(WmudPlayer *player,
|
||||
guint32 id);
|
||||
guint32 wmud_player_get_id(WmudPlayer *player);
|
||||
WmudPlayer *wmud_player_dup(WmudPlayer *player);
|
||||
gboolean wmud_player_password_valid(WmudPlayer *player, const gchar *password);
|
||||
gboolean wmud_player_password_valid(WmudPlayer *player,
|
||||
const gchar *password);
|
||||
|
||||
#endif /* __WMUD_WMUDPLAYER_H__ */
|
||||
|
||||
|
@ -39,15 +39,13 @@ typedef struct _WmudWorld WmudWorld;
|
||||
typedef struct _WmudWorldClass WmudWorldClass;
|
||||
typedef struct _WmudWorldPrivate WmudWorldPrivate;
|
||||
|
||||
struct _WmudWorld
|
||||
{
|
||||
struct _WmudWorld {
|
||||
/*<private>*/
|
||||
GObject parent_instance;
|
||||
WmudWorldPrivate *priv;
|
||||
};
|
||||
|
||||
struct _WmudWorldClass
|
||||
{
|
||||
struct _WmudWorldClass {
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
|
36
wmud/world.h
36
wmud/world.h
@ -134,18 +134,34 @@ typedef struct _wmudPlanetPlaneAssoc {
|
||||
guint plane_id;
|
||||
} wmudPlanetPlaneAssoc;
|
||||
|
||||
gboolean wmud_world_check_planes(GSList *planes, GError **err);
|
||||
gboolean wmud_world_check_planets(GSList *planets, GError **err);
|
||||
gboolean wmud_world_check_areas(GSList *areas, GError **err);
|
||||
gboolean wmud_world_check_rooms(GSList *rooms, GError **err);
|
||||
gboolean wmud_world_check_exits(GSList *exits, GSList *directions, GSList *rooms, GError **err);
|
||||
gboolean wmud_world_check_planes(GSList *planes,
|
||||
GError **err);
|
||||
gboolean wmud_world_check_planets(GSList *planets,
|
||||
GError **err);
|
||||
gboolean wmud_world_check_areas(GSList *areas,
|
||||
GError **err);
|
||||
gboolean wmud_world_check_rooms(GSList *rooms,
|
||||
GError **err);
|
||||
gboolean wmud_world_check_exits(GSList *exits,
|
||||
GSList *directions,
|
||||
GSList *rooms,
|
||||
GError **err);
|
||||
|
||||
gboolean wmud_world_assoc_planets_planes(GSList *planets, GSList *planes, GSList *planet_planes, GError **err);
|
||||
gboolean wmud_world_assoc_rooms_areas(GSList *rooms, GSList *areas, GError **err);
|
||||
gboolean wmud_world_assoc_rooms_planets(GSList *rooms, GSList *planets, GError **err);
|
||||
void wmud_world_assoc_exits_rooms(GSList *exits, GSList *directions, GSList *rooms, GError **err);
|
||||
gboolean wmud_world_assoc_planets_planes(GSList *planets,
|
||||
GSList *planes,
|
||||
GSList *planet_planes,
|
||||
GError **err);
|
||||
gboolean wmud_world_assoc_rooms_areas(GSList *rooms,
|
||||
GSList *areas,
|
||||
GError **err);
|
||||
gboolean wmud_world_assoc_rooms_planets(GSList *rooms,
|
||||
GSList *planets,
|
||||
GError **err);
|
||||
void wmud_world_assoc_exits_rooms(GSList *exits,
|
||||
GSList *directions,
|
||||
GSList *rooms,
|
||||
GError **err);
|
||||
|
||||
gboolean wmud_world_load(GError **err);
|
||||
|
||||
#endif /* __WMUD_WORLD_H__ */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user