BeagleHit

BeagleHit

Functions

Types and Values

Description

Functions

BEAGLE_HIT()

#define BEAGLE_HIT(x) ((BeagleHit *) x)


beagle_hit_ref ()

BeagleHit *
beagle_hit_ref (BeagleHit *hit);

Increases the reference count of the BeagleHit.

Parameters

hit

a BeagleHit

 

Returns

the BeagleHit.


beagle_hit_unref ()

void
beagle_hit_unref (BeagleHit *hit);

Decreases the reference count of the BeagleHit. When its reference count drops to 0, it is freed.

Parameters

hit

a BeagleHit.

 

beagle_hit_get_uri ()

const char *
beagle_hit_get_uri (BeagleHit *hit);

Fetches the URI of the given BeagleHit.

Parameters

hit

a BeagleHit

 

Returns

the URI of the BeagleHit.


beagle_hit_get_type ()

const char *
beagle_hit_get_type (BeagleHit *hit);

Fetches the type of the given BeagleHit.

Parameters

hit

a BeagleHit

 

Returns

the type of the BeagleHit.


beagle_hit_get_mime_type ()

const char *
beagle_hit_get_mime_type (BeagleHit *hit);

Fetches the mime type of the given BeagleHit.

Parameters

hit

a BeagleHit

 

Returns

the mime type of the BeagleHit.


beagle_hit_get_file_type ()

const char *
beagle_hit_get_file_type (BeagleHit *hit);

For hits based on files, fetches the type of file for the given BeagleHit.

Parameters

hit

a BeagleHit

 

Returns

the file type of the BeagleHit.


beagle_hit_get_source ()

const char *
beagle_hit_get_source (BeagleHit *hit);

Fetches the source of the given BeagleHit.

Parameters

hit

a BeagleHit

 

Returns

the source of the BeagleHit.


beagle_hit_get_parent_uri ()

const char *
beagle_hit_get_parent_uri (BeagleHit *hit);

Fetches the parent URI of the given BeagleHit.

Parameters

hit

a BeagleHit

 

Returns

the parent URI of the BeagleHit.


beagle_hit_get_timestamp ()

BeagleTimestamp *
beagle_hit_get_timestamp (BeagleHit *hit);

Fetches the timestamp of the given BeagleHit.

Parameters

hit

a BeagleHit

 

Returns

the timestamp as a string of the BeagleHit.


beagle_hit_get_score ()

double
beagle_hit_get_score (BeagleHit *hit);

Fetches the score of the given BeagleHit.

Parameters

hit

a BeagleHit

 

Returns

the score of the BeagleHit.


beagle_hit_get_one_property ()

gboolean
beagle_hit_get_one_property (BeagleHit *hit,
                             const char *key,
                             const char **value);

Puts the value of the property key of the given BeagleHit in the string pointed to by value . The value of value is set to NULL if FALSE is returned.

This is a shortcut method for getting the value of a property when you know ahead of time that only one property for a given key exists. This function will fail if the key isn't found or if there is more than one value for a given key.

Parameters

hit

a BeagleHit

 

key

a string

 

value

pointer to a string where value is stored

 

Returns

TRUE if exactly one property with key was found, else FALSE.


beagle_hit_get_properties ()

GSList *
beagle_hit_get_properties (BeagleHit *hit,
                           const char *key);

Fetches all values of the property key of the given BeagleHit.

Parameters

hit

a BeagleHit

 

key

a string

 

Returns

A list of values (char *) of the of property key . The values contained within the list should not be freed.


beagle_hit_get_all_properties ()

GSList *
beagle_hit_get_all_properties (BeagleHit *hit);

Fetches all properties of the given BeagleHit

Parameters

hit

a BeagleHit

 

Returns

A list of all properties (BeagleProperty *) of hit . The values contained within the list should not be freed.

Types and Values

BeagleHit

typedef struct _BeagleHit BeagleHit;