summaryrefslogtreecommitdiff
path: root/apps/plugins/mpegplayer/mpeg_linkedlist.h
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2010-05-17 12:34:05 +0000
committerMichael Sevakis <jethead71@rockbox.org>2010-05-17 12:34:05 +0000
commitfcf36dd4f9879a82342e5606535d2dcf46d1de2a (patch)
tree21ed249c7a6f9d0bd7e2049c7a9f9e0708ba28f8 /apps/plugins/mpegplayer/mpeg_linkedlist.h
parent9fde12676b382a31a10c58e2473edfde460e4d73 (diff)
downloadrockbox-fcf36dd4f9879a82342e5606535d2dcf46d1de2a.zip
rockbox-fcf36dd4f9879a82342e5606535d2dcf46d1de2a.tar.gz
rockbox-fcf36dd4f9879a82342e5606535d2dcf46d1de2a.tar.bz2
rockbox-fcf36dd4f9879a82342e5606535d2dcf46d1de2a.tar.xz
Simplify mpegplayer a bit and use array-based lists rather than linked lists for stream management. Move a couple useful functions to handle pointer arrays from kernel.c into general.c; mpeglayer now makes use of them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26101 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/mpegplayer/mpeg_linkedlist.h')
-rw-r--r--apps/plugins/mpegplayer/mpeg_linkedlist.h71
1 files changed, 0 insertions, 71 deletions
diff --git a/apps/plugins/mpegplayer/mpeg_linkedlist.h b/apps/plugins/mpegplayer/mpeg_linkedlist.h
deleted file mode 100644
index d4f8305..0000000
--- a/apps/plugins/mpegplayer/mpeg_linkedlist.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Linked list API declarations
- *
- * Copyright (c) 2007 Michael Sevakis
- *
- * 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 MPEG_LINKEDLIST_H
-#define MPEG_LINKEDLIST_H
-
-struct list_item
-{
- struct list_item *prev; /* previous item in list */
- struct list_item *next; /* next item in list */
-};
-
-/* Utility macros to help get the actual structure pointer back */
-#define OFFSETOF(type, membername) ((off_t)&((type *)0)->membername)
-#define TYPE_FROM_MEMBER(type, memberptr, membername) \
- ((type *)((intptr_t)(memberptr) - OFFSETOF(type, membername)))
-
-/* Initialize a master list head */
-void list_initialize(struct list_item *master_list_head);
-
-/* Are there items after the head item? */
-bool list_is_empty(struct list_item *head_item);
-
-/* Does the item belong to a list? */
-bool list_is_item_listed(struct list_item *item);
-
-/* Is the item a member in a particular list? */
-bool list_is_member(struct list_item *master_list_head,
- struct list_item *item);
-
-/* Remove an item from a list - no head item needed */
-void list_remove_item(struct list_item *item);
-
-/* Add a list item after the base item */
-void list_add_item(struct list_item *head_item,
- struct list_item *item);
-
-/* Clear list items after the head item */
-void list_clear_all(struct list_item *head_item);
-
-/* Enumerate all items after the head item - passing each item in turn
- * to the callback as well as the data value. The current item may be
- * safely removed. Items added after the current position will be enumated
- * but not ones added before it. The callback may return false to stop
- * the enumeration. */
-typedef bool (*list_enum_callback_t)(struct list_item *item, intptr_t data);
-
-void list_enum_items(struct list_item *head_item,
- list_enum_callback_t callback,
- intptr_t data);
-
-#endif /* MPEG_LINKEDLIST_H */