#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) |
G_GNUC_DEPRECATED GValueArray * | rtcom_el_iter_get_valuearray (RTComElIter *it,...) |
GHashTable * | rtcom_el_iter_get_value_map (RTComElIter *it,...) |
gboolean | rtcom_el_iter_get_values (RTComElIter *it,...) |
RTComElAttachIter * | rtcom_el_iter_get_attachments (RTComElIter *it) |
gboolean | rtcom_el_iter_get_raw (RTComElIter *it, const gchar *col, GValue *value) |
gboolean | rtcom_el_iter_get_full (RTComElIter *it, RTComElEvent *ev) |
G_GNUC_DEPRECATED gboolean | rtcom_el_iter_get (RTComElIter *it, RTComElEvent *ev) |
const GHashTable * | rtcom_el_iter_get_columns (RTComElIter *it) |
gchar * | rtcom_el_iter_get_header_raw (RTComElIter *it, const gchar *key) |
Copyright (C) 2005-06 Nokia Corporation. Contact: Naba Kumar <naba.kumar@nokia.com>
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.
gboolean rtcom_el_iter_first | ( | RTComElIter * | it | ) |
Resets the iterator to its first event.
it | The RTComElIter. |
G_GNUC_DEPRECATED gboolean rtcom_el_iter_get | ( | RTComElIter * | it, | |
RTComElEvent * | ev | |||
) |
Deprecated name of rtcom_el_iter_get_full(). Consider using rtcom_el_get_columns() if possible.
RTComElAttachIter* rtcom_el_iter_get_attachments | ( | RTComElIter * | it | ) |
Returns an iterator to the attachments of the event this iterator points to.
it | The iterator for this event. |
const GHashTable* rtcom_el_iter_get_columns | ( | RTComElIter * | it | ) |
Gets a GHashTable of (gchar* -> GValue) mapping event fields to their GValues. Both the keys and values are borrowed. Plugins are *not* queried, only the fields directly from the database are returned. This guarantees no additional SQL queries will be done, so it can be used in tight loops.
it | The iterator |
gboolean rtcom_el_iter_get_full | ( | RTComElIter * | it, | |
RTComElEvent * | ev | |||
) |
Gets a RTComElEvent representing the current iterator. Note: this calls into plugin and can result in additional SQL queries, avoid calling it in tight loops. Consider using rtcom_el_iter_get_columns() where possible.
it | The iterator | |
ev | A pointer to the RTComElEvent to populate, which should be zero-filled |
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.
it | The iterator. | |
key | The header's key. |
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.
it | The iterator. | |
col | The column name. | |
value | A placeholder for the velua. |
GHashTable* rtcom_el_iter_get_value_map | ( | RTComElIter * | it, | |
... | ||||
) |
Returns a GHashTable* (or NULL if error) containing all the requested items.
it | The RTComElIter | |
... | variable number of strings (NULL terminated) representing requested item names. |
G_GNUC_DEPRECATED 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.
Note: This is deprecated function, use rtcom_el_iter_get_value_map() or rtcom_el_iter_get_values() where possible.
it | The RTComElIter. |
gboolean rtcom_el_iter_get_values | ( | RTComElIter * | it, | |
... | ||||
) |
Returns the requested item values, similar to g_object_get().
Example: gchar *service; gint event_id; if (rtcom_el_iter_get_values (it, "service", &service, "event-id", &event_id, NULL)) { ...success... }
it | The RTComElIter | |
... | variable number of (item name, buffer to store item value reference) pairs. The buffer type must be appropriate for the value extraced (one of gint *, gchar**, gboolean*). |
gboolean rtcom_el_iter_next | ( | RTComElIter * | it | ) |
Advances the iterator to its next event.
it | The RTComElIter. |