Tizen Native API
Eina_Iterator usage

As always when using eina we need to include it:

Here we a declare an unimpressive function that prints some data:

Note:
Returning EINA_TRUE is important so we don't stop iterating over the container.

And here a more interesting function, it uses an iterator to print the contents of a container. What's interesting about it is that it doesn't care the type of container, it works for anything that can provide an iterator:

And on to our main function were we declare some variables and initialize eina, nothing too special:

Next we populate both an array and a list with our strings, for more details see Adding elements to Eina_List and Basic array usage :

And now we create an array and because the first element of the container doesn't interest us we skip it:

Having our iterator now pointing to interesting data we go ahead and print:

As always once data with a structure we free it, but just because we can we do it by asking the iterator for it's container, and then of course free the iterator itself:

But so far you're not impressed in Basic array usage an array is also printed, so now we go to the cool stuff and use an iterator to do same stuff to a list:

Note:
The only significant diference to the block above is in the function used to create the iterator.

And now we free the list and shut eina down: