ZeitgeistSubject

## ZeitgeistSubject ZeitgeistSubject — ZeitgeistSubject |

## Synopsis

    #include <zeitgeist-subject.h>

                        ZeitgeistSubject;
    struct              ZeitgeistSubjectClass;
    const gchar *       zeitgeist_subject_get_current_uri   (ZeitgeistSubject *subject);
    const gchar *       zeitgeist_subject_get_interpretation
                                                            (ZeitgeistSubject *subject);
    const gchar *       zeitgeist_subject_get_manifestation (ZeitgeistSubject *subject);
    const gchar *       zeitgeist_subject_get_mimetype      (ZeitgeistSubject *subject);
    const gchar *       zeitgeist_subject_get_origin        (ZeitgeistSubject *subject);
    const gchar *       zeitgeist_subject_get_storage       (ZeitgeistSubject *subject);
    const gchar *       zeitgeist_subject_get_text          (ZeitgeistSubject *subject);
    const gchar *       zeitgeist_subject_get_uri           (ZeitgeistSubject *subject);
    ZeitgeistSubject *  zeitgeist_subject_new               (void);
    ZeitgeistSubject *  zeitgeist_subject_new_full          (const gchar *uri,
                                                             const gchar *interpretation,
                                                             const gchar *manifestation,
                                                             const gchar *mimetype,
                                                             const gchar *origin,
                                                             const gchar *text,
                                                             const gchar *storage);
    void                zeitgeist_subject_set_current_uri   (ZeitgeistSubject *subject,
                                                             const gchar *current_uri);
    void                zeitgeist_subject_set_interpretation
                                                            (ZeitgeistSubject *subject,
                                                             const gchar *interpretation);
    void                zeitgeist_subject_set_manifestation (ZeitgeistSubject *subject,
                                                             const gchar *manifestation);
    void                zeitgeist_subject_set_mimetype      (ZeitgeistSubject *subject,
                                                             const gchar *mimetype);
    void                zeitgeist_subject_set_origin        (ZeitgeistSubject *subject,
                                                             const gchar *origin);
    void                zeitgeist_subject_set_storage       (ZeitgeistSubject *subject,
                                                             const gchar *storage);
    void                zeitgeist_subject_set_text          (ZeitgeistSubject *subject,
                                                             const gchar *text);
    void                zeitgeist_subject_set_uri           (ZeitgeistSubject *subject,
                                                             const gchar *uri);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ZeitgeistSubject

## Description

ZeitgeistSubject.

## Details

### ZeitgeistSubject

    typedef struct _ZeitgeistSubject ZeitgeistSubject;

### struct ZeitgeistSubjectClass

    struct ZeitgeistSubjectClass {
      GInitiallyUnownedClass parent_class;
    };

### zeitgeist_subject_get_current_uri ()

    const gchar *       zeitgeist_subject_get_current_uri   (ZeitgeistSubject *subject);

Get the current_uri of a subject.

This is the updated URI taking into account possible relocations of the resource. It is illegal to insert an event with subjects having a `current_uri' different than their `uri'.

A special case is events with ZEITGEIST_ZG_MOVE_EVENT interpretation. In this case, `current_uri' is the destination to which `uri' is being moved, and they are expected to be different.

`subject` : | The subject to get the current_uri from
Returns : | The current_uri of `subject`.

Since 0.3.14

### zeitgeist_subject_get_interpretation ()

    const gchar *       zeitgeist_subject_get_interpretation
                                                            (ZeitgeistSubject *subject);

### zeitgeist_subject_get_manifestation ()

    const gchar *       zeitgeist_subject_get_manifestation (ZeitgeistSubject *subject);

### zeitgeist_subject_get_mimetype ()

    const gchar *       zeitgeist_subject_get_mimetype      (ZeitgeistSubject *subject);

### zeitgeist_subject_get_origin ()

    const gchar *       zeitgeist_subject_get_origin        (ZeitgeistSubject *subject);

### zeitgeist_subject_get_storage ()

    const gchar *       zeitgeist_subject_get_storage       (ZeitgeistSubject *subject);

### zeitgeist_subject_get_text ()

    const gchar *       zeitgeist_subject_get_text          (ZeitgeistSubject *subject);

### zeitgeist_subject_get_uri ()

    const gchar *       zeitgeist_subject_get_uri           (ZeitgeistSubject *subject);

### zeitgeist_subject_new ()

    ZeitgeistSubject *  zeitgeist_subject_new               (void);

Create a new empty subject structure

Returns : | A newly create ZeitgeistSubject instance. The returned subject will have a floating reference which will be consumed if you pass the event to any of the methods provided by this library (like adding it to an event). If you do not do that then you must free the subject youself with `g_object_unref()`

### zeitgeist_subject_new_full ()

    ZeitgeistSubject *  zeitgeist_subject_new_full          (const gchar *uri,
                                                             const gchar *interpretation,
                                                             const gchar *manifestation,
                                                             const gchar *mimetype,
                                                             const gchar *origin,
                                                             const gchar *text,
                                                             const gchar *storage);

`uri` : | The URI or URL of the subject
`interpretation` : | The interpretation type of the subject. See the list of interpretation types
`manifestation` : | The manifestation type of the subject. See the list of manifestation types
`mimetype` : | The mimetype of the subject. Eg. text/plain
`origin` : | The origin of the subject. See `zeitgeist_subject_set_origin()` for details
`text` : | A small textual representation of the subject suitable for display
`storage` : | String identifier for the storage medium the subject is on. Se `zeitgeist_subject_set_storage()` for details Create a new subject structure with predefined data
Returns : | A newly create ZeitgeistSubject instance. The returned subject will have a floating reference which will be consumed if you pass the event to any of the methods provided by this library (like adding it to an event). If you do not do that then you must free the subject youself with `g_object_unref()`

### zeitgeist_subject_set_current_uri ()

    void                zeitgeist_subject_set_current_uri   (ZeitgeistSubject *subject,
                                                             const gchar *current_uri);

Set the current_uri of a subject.

This is the updated URI taking into account possible relocations of the resource. It is illegal to insert an event with subjects having a `current_uri' different than their `uri'.

A special case is events with ZEITGEIST_ZG_MOVE_EVENT interpretation. In this case, `current_uri' is the destination to which `uri' is being moved, and they are expected to be different.

`subject` : | The subject to set the current_uri for
`current_uri` : | The current_uri to set

Since 0.3.14

### zeitgeist_subject_set_interpretation ()

    void                zeitgeist_subject_set_interpretation
                                                            (ZeitgeistSubject *subject,
                                                             const gchar *interpretation);

### zeitgeist_subject_set_manifestation ()

    void                zeitgeist_subject_set_manifestation (ZeitgeistSubject *subject,
                                                             const gchar *manifestation);

### zeitgeist_subject_set_mimetype ()

    void                zeitgeist_subject_set_mimetype      (ZeitgeistSubject *subject,
                                                             const gchar *mimetype);

### zeitgeist_subject_set_origin ()

    void                zeitgeist_subject_set_origin        (ZeitgeistSubject *subject,
                                                             const gchar *origin);

### zeitgeist_subject_set_storage ()

    void                zeitgeist_subject_set_storage       (ZeitgeistSubject *subject,
                                                             const gchar *storage);

### zeitgeist_subject_set_text ()

    void                zeitgeist_subject_set_text          (ZeitgeistSubject *subject,
                                                             const gchar *text);

### zeitgeist_subject_set_uri ()

    void                zeitgeist_subject_set_uri           (ZeitgeistSubject *subject,
                                                             const gchar *uri);