## CamelObject CamelObject |

## Functions

GQuark | camel_error_quark ()
gint | camel_object_state_read ()
gint | camel_object_state_write ()
const gchar * | camel_object_get_state_filename ()
void | camel_object_set_state_filename ()

## Properties

char * | state-filename | Read / Write / Construct

## Types and Values

#define | CAMEL_ERROR
enum | CamelParamFlags
enum | CamelError

## Object Hierarchy

        GObject
        ╰── CamelObject
            ├── CamelFolder
            ╰── CamelService

## Description

## Functions

### camel_error_quark ()

    GQuark
    camel_error_quark (void);

### camel_object_state_read ()

    gint
    camel_object_state_read (CamelObject *object);

Read persistent object state from “state-filename”.

#### Parameters

object | a CamelObject |

#### Returns

-1 on error.

### camel_object_state_write ()

    gint
    camel_object_state_write (CamelObject *object);

Write persistent object state “state-filename”.

#### Parameters

object | a CamelObject |

#### Returns

-1 on error.

### camel_object_get_state_filename ()

    const gchar *
    camel_object_get_state_filename (CamelObject *object);

Returns the name of the file in which persistent property values for `object` are stored. The file is used by `camel_object_state_write()` and `camel_object_state_read()` to save and restore object state.

#### Parameters

object | a CamelObject |

#### Returns

the name of the persistent property file

Since: 2.32

### camel_object_set_state_filename ()

    void
    camel_object_set_state_filename (CamelObject *object,
                                     const gchar *state_filename);

Sets the name of the file in which persistent property values for `object` are stored. The file is used by `camel_object_state_write()` and `camel_object_state_read()` to save and restore object state.

#### Parameters

object | a CamelObject |
state_filename | path to a local file |

Since: 2.32

## Types and Values

### CAMEL_ERROR

    #define             CAMEL_ERROR

Since: 2.32

### enum CamelParamFlags

These flags extend GParamFlags. Most of the time you will use them in conjunction with `g_object_class_install_property()`.

#### Members

CAMEL_PARAM_PERSISTENT | The parameter is persistent, which means its value is saved to “state-filename” during `camel_object_state_write()`, and restored during `camel_object_state_read()`. |

Since: 2.32

### enum CamelError

#### Members

CAMEL_ERROR_GENERIC | a generic (fallback) error code |

Since: 2.32

## Property Details

### The `“state-filename”` property

      “state-filename”           char *

The file in which to store persistent property values for this instance.

Owner: CamelObject

Flags: Read / Write / Construct

Default value: NULL