XesamGHit

XesamGHit

Synopsis




                    XesamGHit;
const GValue*       xesam_g_hit_get_field               (XesamGHit *hit,
                                                         const gchar *field_name);
const GValue*       xesam_g_hit_get_field_by_id         (XesamGHit *hit,
                                                         guint field_id);
guint               xesam_g_hit_get_id                  (XesamGHit *hit);
gchar**             xesam_g_hit_get_field_names         (XesamGHit *hit);
const GPtrArray*    xesam_g_hit_get_data                (XesamGHit *hit);

Object Hierarchy


  GObject
   +----XesamGHit

Description

Details

XesamGHit

typedef struct _XesamGHit XesamGHit;


xesam_g_hit_get_field ()

const GValue*       xesam_g_hit_get_field               (XesamGHit *hit,
                                                         const gchar *field_name);

Get the value of a field by name look up. This method has the overhead of a hash table look up. For even faster access use xesam_g_hit_get_field_by_id().

Alternatively use xesam_g_hit_get_field_by_id() if you know the array index of the field in the session's hit-fields property.

hit : The hit object on which to look up a field value
field_name : The fully qualified name of the field as set through the session property XesamGSession:hit-fields.
Returns : The value of a named field. If the field is not known NULL is returned.

xesam_g_hit_get_field_by_id ()

const GValue*       xesam_g_hit_get_field_by_id         (XesamGHit *hit,
                                                         guint field_id);

Look up a field value based on the offset of the field name in the sessions XesamGSession:hit-fields property.

To look up a field by name use xesam_g_hit_get_field().

hit : The hit object on which to look up a field value
field_id : The offset the field in the session property XesamGSession:hit-fields.
Returns : The value of a field given by its offset in the session's hit-fields property.

xesam_g_hit_get_id ()

guint               xesam_g_hit_get_id                  (XesamGHit *hit);

The Hit id is the offset of the hit within the scope of all results returned by a XesamGSearch.

hit : The hit to get the id for
Returns : The hit id. This is defined as the offset of the hit relative to the total number of hits retrieved from the server.

xesam_g_hit_get_field_names ()

gchar**             xesam_g_hit_get_field_names         (XesamGHit *hit);

Return a NULL terminated array listing the field names used in this Hit. You must free the array and its content manually.

hit : The hit object for which to list the field names
Returns : A NULL terminated array of strings

xesam_g_hit_get_data ()

const GPtrArray*    xesam_g_hit_get_data                (XesamGHit *hit);

Get raw access to the hits field data. The data in the returned array map to the fields specified in XesamGSession:hit-fields property.

hit : The hit object for which to return the data list for
Returns : A pointer array containing the raw hit data. This array should not be modified.