diff -r bbf46f59e123 -r 25ffed67c7ef graphicscomposition/openwfcompositionengine/common/src/owflinkedlist.c --- a/graphicscomposition/openwfcompositionengine/common/src/owflinkedlist.c Tue Aug 31 16:31:06 2010 +0300 +++ b/graphicscomposition/openwfcompositionengine/common/src/owflinkedlist.c Wed Sep 01 12:39:21 2010 +0100 @@ -1,5 +1,4 @@ /* Copyright (c) 2009 The Khronos Group Inc. - * Portions copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies) * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and/or associated documentation files (the @@ -166,6 +165,30 @@ return root; } +OWF_API_CALL void +OWF_List_ForEach(OWF_NODE* root, NODEITERFUNC func, void* data) +{ + while (root) { + if (!func(root->data, data)) { + return; + } + root = root->next; + } +} + +OWF_API_CALL OWF_NODE* +OWF_List_Find(OWF_NODE* root, NODECMPFUNC func, void* data) +{ + while (root) { + if (func(root->data, data)) { + break; + } + root = root->next; + } + return root; +} + + #ifdef __cplusplus } #endif