## ESource

ESource

## Synopsis

                        ESource;
    ESource *           e_source_new                        (const gchar *name,
                                                             const gchar *relative_uri);
    ESource *           e_source_new_with_absolute_uri      (const gchar *name,
                                                             const gchar *absolute_uri);
    ESource *           e_source_new_from_xml_node          (xmlNodePtr node);
    ESource *           e_source_new_from_standalone_xml    (const gchar *xml);
    ESource *           e_source_copy                       (ESource *source);
    gboolean            e_source_update_from_xml_node       (ESource *source,
                                                             xmlNodePtr node,
                                                             gboolean *changed_return);
    gchar *             e_source_uid_from_xml_node          (xmlNodePtr node);
    void                e_source_set_group                  (ESource *source,
                                                             ESourceGroup *group);
    void                e_source_set_name                   (ESource *source,
                                                             const gchar *name);
    void                e_source_set_relative_uri           (ESource *source,
                                                             const gchar *relative_uri);
    void                e_source_set_absolute_uri           (ESource *source,
                                                             const gchar *absolute_uri);
    void                e_source_set_color_spec             (ESource *source,
                                                             const gchar *color_spec);
    void                e_source_set_readonly               (ESource *source,
                                                             gboolean readonly);
    ESourceGroup *      e_source_peek_group                 (ESource *source);
    const gchar *       e_source_peek_uid                   (ESource *source);
    const gchar *       e_source_peek_name                  (ESource *source);
    const gchar *       e_source_peek_relative_uri          (ESource *source);
    const gchar *       e_source_peek_absolute_uri          (ESource *source);
    const gchar *       e_source_peek_color_spec            (ESource *source);
    gboolean            e_source_get_readonly               (ESource *source);
    gchar *             e_source_get_uri                    (ESource *source);
    void                e_source_dump_to_xml_node           (ESource *source,
                                                             xmlNodePtr parent_node);
    gchar *             e_source_to_standalone_xml          (ESource *source);
    const gchar *       e_source_get_property               (ESource *source,
                                                             const gchar *property);
    void                e_source_set_property               (ESource *source,
                                                             const gchar *property,
                                                             const gchar *value);
    void                e_source_foreach_property           (ESource *source,
                                                             GHFunc func,
                                                             gpointer data);
    gchar *             e_source_get_duped_property         (ESource *source,
                                                             const gchar *property);
    gchar *             e_source_build_absolute_uri         (ESource *source);
    gboolean            e_source_equal                      (ESource *a,
                                                             ESource *b);
    gboolean            e_source_xmlstr_equal               (const gchar *a,
                                                             const gchar *b);

## Object Hierarchy

      GObject
       +----ESource

## Signals

      "changed"                                        : Run Last

## Description

## Details

### ESource

    typedef struct _ESource ESource;

### e_source_new ()

    ESource *           e_source_new                        (const gchar *name,
                                                             const gchar *relative_uri);

`name` : |
`relative_uri` : |
Returns : |

### e_source_new_with_absolute_uri ()

    ESource *           e_source_new_with_absolute_uri      (const gchar *name,
                                                             const gchar *absolute_uri);

`name` : |
`absolute_uri` : |
Returns : |

### e_source_new_from_xml_node ()

    ESource *           e_source_new_from_xml_node          (xmlNodePtr node);

`node` : |
Returns : |

### e_source_new_from_standalone_xml ()

    ESource *           e_source_new_from_standalone_xml    (const gchar *xml);

`xml` : |
Returns : |

### e_source_copy ()

    ESource *           e_source_copy                       (ESource *source);

`source` : |
Returns : |

### e_source_update_from_xml_node ()

    gboolean            e_source_update_from_xml_node       (ESource *source,
                                                             xmlNodePtr node,
                                                             gboolean *changed_return);

Update the ESource properties from `node`.

`source` : | An ESource.
`node` : | A pointer to the node to parse.
`changed_return` : |
Returns : | `TRUE` if the data in `node` was recognized and parsed into acceptable values for `source`, `FALSE` otherwise.

### e_source_uid_from_xml_node ()

    gchar *             e_source_uid_from_xml_node          (xmlNodePtr node);

`node` : |
Returns : |

### e_source_set_group ()

    void                e_source_set_group                  (ESource *source,
                                                             ESourceGroup *group);

`source` : |
`group` : |

### e_source_set_name ()

    void                e_source_set_name                   (ESource *source,
                                                             const gchar *name);

`source` : |
`name` : |

### e_source_set_relative_uri ()

    void                e_source_set_relative_uri           (ESource *source,
                                                             const gchar *relative_uri);

`source` : |
`relative_uri` : |

### e_source_set_absolute_uri ()

    void                e_source_set_absolute_uri           (ESource *source,
                                                             const gchar *absolute_uri);

`source` : |
`absolute_uri` : |

### e_source_set_color_spec ()

    void                e_source_set_color_spec             (ESource *source,
                                                             const gchar *color_spec);

Store a textual representation of a color in `source`. The `color_spec` string should be parsable by #`gdk_color_parse()`, or `NULL` to unset the color in `source`.

`source` : | an ESource
`color_spec` : | a string specifying the color

Since 1.10

### e_source_set_readonly ()

    void                e_source_set_readonly               (ESource *source,
                                                             gboolean readonly);

`source` : |
`readonly` : |

### e_source_peek_group ()

    ESourceGroup *      e_source_peek_group                 (ESource *source);

`source` : |
Returns : |

### e_source_peek_uid ()

    const gchar *       e_source_peek_uid                   (ESource *source);

`source` : |
Returns : |

### e_source_peek_name ()

    const gchar *       e_source_peek_name                  (ESource *source);

`source` : |
Returns : |

### e_source_peek_relative_uri ()

    const gchar *       e_source_peek_relative_uri          (ESource *source);

`source` : |
Returns : |

### e_source_peek_absolute_uri ()

    const gchar *       e_source_peek_absolute_uri          (ESource *source);

`source` : |
Returns : |

### e_source_peek_color_spec ()

    const gchar *       e_source_peek_color_spec            (ESource *source);

Return the textual representation of the color for `source`, or `NULL` if it has none. The returned string should be parsable by #`gdk_color_parse()`.

`source` : | an ESource
Returns : | a string specifying the color

Since 1.10

### e_source_get_readonly ()

    gboolean            e_source_get_readonly               (ESource *source);

`source` : |
Returns : |

### e_source_get_uri ()

    gchar *             e_source_get_uri                    (ESource *source);

`source` : |
Returns : |

### e_source_dump_to_xml_node ()

    void                e_source_dump_to_xml_node           (ESource *source,
                                                             xmlNodePtr parent_node);

`source` : |
`parent_node` : |

### e_source_to_standalone_xml ()

    gchar *             e_source_to_standalone_xml          (ESource *source);

`source` : |
Returns : |

### e_source_get_property ()

    const gchar *       e_source_get_property               (ESource *source,
                                                             const gchar *property);

`source` : |
`property` : |
Returns : |

### e_source_set_property ()

    void                e_source_set_property               (ESource *source,
                                                             const gchar *property,
                                                             const gchar *value);

`source` : |
`property` : |
`value` : |

### e_source_foreach_property ()

    void                e_source_foreach_property           (ESource *source,
                                                             GHFunc func,
                                                             gpointer data);

`source` : |
`func` : |
`data` : |

### e_source_get_duped_property ()

    gchar *             e_source_get_duped_property         (ESource *source,
                                                             const gchar *property);

`source` : |
`property` : |
Returns : |

Since 1.12

### e_source_build_absolute_uri ()

    gchar *             e_source_build_absolute_uri         (ESource *source);

`source` : |
Returns : |

### e_source_equal ()

    gboolean            e_source_equal                      (ESource *a,
                                                             ESource *b);

Compares if `a` is equivalent to `b`.

`a` : | An ESource
`b` : | Another ESource
Returns : | `TRUE` if `a` is equivalent to `b`, `FALSE` otherwise.

Since 2.24

### e_source_xmlstr_equal ()

    gboolean            e_source_xmlstr_equal               (const gchar *a,
                                                             const gchar *b);

Compares if `a` is equivalent to `b`.

`a` : | XML representation of an ESource
`b` : | XML representation of another ESource
Returns : | `TRUE` if `a` is equivalent to `b`, `FALSE` otherwise.

Since 2.24

## Signal Details

### The `"changed"` signal

    void                user_function                      (ESource *esource,
                                                            gpointer user_data)      : Run Last

`esource` : | the object which received the signal.
`user_data` : | user data set when the signal handler was connected.