From f2d5c3532fd21c04e77aa86732742b578283b697 Mon Sep 17 00:00:00 2001 From: Mustapha Senhaji Date: Wed, 11 Feb 2009 16:03:17 +0000 Subject: New game plugin by Joshua Simmons FS#7369: Goban plugin, Go/Igo/Weiqi/Baduk game recorder and viewer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19972 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/goban/sgf_storage.h | 57 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 apps/plugins/goban/sgf_storage.h (limited to 'apps/plugins/goban/sgf_storage.h') diff --git a/apps/plugins/goban/sgf_storage.h b/apps/plugins/goban/sgf_storage.h new file mode 100644 index 0000000000..4835c8c9d2 --- /dev/null +++ b/apps/plugins/goban/sgf_storage.h @@ -0,0 +1,57 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2007-2009 Joshua Simmons + * + * 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; either version 2 + * of the License, or (at your option) any later version. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#ifndef GOBAN_SGF_STORAGE_H +#define GOBAN_SGF_STORAGE_H + +#include "types.h" + +/* Must be called (and return true) before using anything in the SGF + subsystem returns false on failure */ +bool setup_sgf (void); + +/* Do cleanup, call before exiting the plugin. You must not use any SGF + subsystem functions after calling this */ +void cleanup_sgf (void); + +/* Get ready for a new game (either loaded or blank) */ +void clear_caches_sgf (void); + +/* Clear the SGF tree and get it ready for a new game (loaded or blank) */ +void free_tree_sgf (void); + +/* Returns true if the Rockbox audio buffer has been stolen */ +bool audio_stolen_sgf (void); + +/* Returns a handle to a struct storage_t (NOT a pointer) < 0 handles are + invalid */ +int alloc_storage_sgf (void); + +/* Free one storage location */ +void free_storage_sgf (int handle); + +/* Get a pointer to a node or property which corresponds to the given + * storage handle + */ +struct node_t *get_node (int handle); +struct prop_t *get_prop (int handle); + +#endif -- cgit v1.2.3