rtcom-eventlogger/eventlogger-iter.h File Reference

Describes an RTComElIter class. More...

#include <glib-object.h>
#include "rtcom-eventlogger/eventlogger-types.h"
#include "rtcom-eventlogger/eventlogger-attach-iter.h"
#include "rtcom-eventlogger/event.h"

Go to the source code of this file.

Functions

gboolean rtcom_el_iter_first (RTComElIter *it)
gboolean rtcom_el_iter_next (RTComElIter *it)
gboolean rtcom_el_iter_refresh (RTComElIter *it)
GValueArray * rtcom_el_iter_get_valuearray (RTComElIter *it,...)
RTComElAttachIter * rtcom_el_iter_get_attachments (RTComElIter *it)
const gchar * rtcom_el_iter_get_service (RTComElIter *it)
const gchar * rtcom_el_iter_get_event_type (RTComElIter *it)
gboolean rtcom_el_iter_get_raw (RTComElIter *it, const gchar *col, GValue *value)
gboolean rtcom_el_iter_get (RTComElIter *it, RTComElEvent *ev)
gchar * rtcom_el_iter_get_header_raw (RTComElIter *it, const gchar *key)


Detailed Description

Describes an RTComElIter class.

Copyright (C) 2005-06 Nokia Corporation. Contact: Naba Kumar <[email protected]>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

An RTComElIter lets you iterate through events.

Definition in file eventlogger-iter.h.


Function Documentation

gboolean rtcom_el_iter_first ( RTComElIter *  it  ) 

Resets the iterator to its first event.

Parameters:
it The RTComElIter.
Returns:
TRUE if success, FALSE if failed.
Examples:
check_el.c.

gboolean rtcom_el_iter_get ( RTComElIter *  it,
RTComElEvent *  ev 
)

Gets a RTComElEvent representing the current iterator.

Parameters:
it The iterator
ev A pointer to the RTComElEvent to populate, which should be zero-filled
Returns:
TRUE in case of success, FALSE in case of failure
Examples:
check_el.c.

RTComElAttachIter* rtcom_el_iter_get_attachments ( RTComElIter *  it  ) 

Returns an iterator to the attachments of the event this iterator points to.

Parameters:
it The iterator for this event.
Returns:
An RTComElAttachIter.
Examples:
check_el.c.

const gchar* rtcom_el_iter_get_event_type ( RTComElIter *  it  ) 

Gets the event-type name.

Parameters:
it The iterator
Returns:
The event-type name.
Examples:
check_el.c.

gchar* rtcom_el_iter_get_header_raw ( RTComElIter *  it,
const gchar *  key 
)

Gets a raw header value from the db. This function should only be used by plugins.

Parameters:
it The iterator.
key The header's key.
Returns:
The header's value.

gboolean rtcom_el_iter_get_raw ( RTComElIter *  it,
const gchar *  col,
GValue *  value 
)

Gets a raw field from the db. This function should only be used by plugins.

Parameters:
it The iterator.
col The column name.
value A placeholder for the velua.
Returns:
TRUE on success, FALSE on failure.

const gchar* rtcom_el_iter_get_service ( RTComElIter *  it  ) 

Gets the service name.

Parameters:
it The iterator
Returns:
The service name.
Examples:
check_el.c.

GValueArray* rtcom_el_iter_get_valuearray ( RTComElIter *  it,
  ... 
)

Returns a GValueArray* (or NULL if error), containing all the requested items. E.g.: values = rtcom_el_iter_get_valuearray(it, "local-uid", "channel", NULL); This will put the appropriate values in the GValueArray*. The property name can be anything the appropriate plugin will understand.

TODO: this is cumbersome if you don't need the value array itself, only individual fields. Could there be something along the lines of g_object_get()?

Parameters:
it The RTComElIter.
Returns:
A GValueArray.
Examples:
check_el.c.

gboolean rtcom_el_iter_next ( RTComElIter *  it  ) 

Advances the iterator to its next event.

Parameters:
it The RTComElIter.
Returns:
FALSE if there’s no next event.
Examples:
check_el.c.

gboolean rtcom_el_iter_refresh ( RTComElIter *  it  ) 

Runs the same SQL again and places the iterator to the first row. It's not safe to use the iterator again if this function returns FALSE.

Parameters:
it The RTComElIter
Returns:
TRUE if success, FALSE if failed.
Examples:
check_el.c.


Generated on Fri Jan 22 13:47:27 2010 for rtcom-eventlogger by  doxygen 1.5.6