AgsSimpleFile

AgsSimpleFile

Functions

Properties

AgsApplicationContext * application-context Read / Write
gchar * audio-encoding Read / Write
gchar * audio-format Read / Write
gchar * encoding Read / Write
gchar * filename Read / Write
gpointer xml-doc Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── AgsSimpleFile

Description

Functions

ags_simple_file_str2md5 ()

gchar *
ags_simple_file_str2md5 (gchar *content,
                         guint content_length);

ags_simple_file_add_id_ref ()

void
ags_simple_file_add_id_ref (AgsSimpleFile *simple_file,
                            GObject *id_ref);

ags_simple_file_find_id_ref_by_node ()

GObject *
ags_simple_file_find_id_ref_by_node (AgsSimpleFile *simple_file,
                                     xmlNode *node);

ags_simple_file_find_id_ref_by_xpath ()

GList *
ags_simple_file_find_id_ref_by_xpath (AgsSimpleFile *simple_file,
                                      gchar *xpath);

ags_simple_file_find_id_ref_by_reference ()

GList *
ags_simple_file_find_id_ref_by_reference
                               (AgsSimpleFile *simple_file,
                                gpointer ref);

ags_simple_file_add_lookup ()

void
ags_simple_file_add_lookup (AgsSimpleFile *simple_file,
                            GObject *file_lookup);

ags_simple_file_add_launch ()

void
ags_simple_file_add_launch (AgsSimpleFile *simple_file,
                            GObject *file_launch);

ags_simple_file_open ()

void
ags_simple_file_open (AgsSimpleFile *simple_file,
                      GError **error);

ags_simple_file_open_from_data ()

void
ags_simple_file_open_from_data (AgsSimpleFile *simple_file,
                                gchar *data,
                                guint length,
                                GError **error);

ags_simple_file_rw_open ()

void
ags_simple_file_rw_open (AgsSimpleFile *simple_file,
                         gboolean create,
                         GError **error);

ags_simple_file_open_filename ()

void
ags_simple_file_open_filename (AgsSimpleFile *simple_file,
                               gchar *filename);

ags_simple_file_close ()

void
ags_simple_file_close (AgsSimpleFile *simple_file);

ags_simple_file_write ()

void
ags_simple_file_write (AgsSimpleFile *simple_file);

ags_simple_file_write_resolve ()

void
ags_simple_file_write_resolve (AgsSimpleFile *simple_file);

ags_simple_file_read ()

void
ags_simple_file_read (AgsSimpleFile *simple_file);

ags_simple_file_read_resolve ()

void
ags_simple_file_read_resolve (AgsSimpleFile *simple_file);

ags_simple_file_read_start ()

void
ags_simple_file_read_start (AgsSimpleFile *simple_file);

ags_simple_file_new ()

AgsSimpleFile *
ags_simple_file_new ();

AGS_IS_SIMPLE_FILE()

#define AGS_IS_SIMPLE_FILE(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SIMPLE_FILE))

AGS_SIMPLE_FILE()

#define AGS_SIMPLE_FILE(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SIMPLE_FILE, AgsSimpleFile))

AGS_SIMPLE_FILE_CLASS()

#define AGS_SIMPLE_FILE_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SIMPLE_FILE, AgsSimpleFileClass))

AGS_SIMPLE_FILE_GET_CLASS()

#define AGS_SIMPLE_FILE_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), AGS_TYPE_SIMPLE_FILE, AgsSimpleFileClass))

ags_simple_file_get_type ()

GType
ags_simple_file_get_type (void);

Types and Values

AGS_SIMPLE_FILE_DEFAULT_ENCODING

#define AGS_SIMPLE_FILE_DEFAULT_ENCODING "UTF-8\0"

AGS_SIMPLE_FILE_DEFAULT_DTD

#define AGS_SIMPLE_FILE_DEFAULT_DTD "ags_simple_file.dtd\0"

AGS_SIMPLE_FILE_CHECKSUM_LENGTH

#define AGS_SIMPLE_FILE_CHECKSUM_LENGTH (g_checksum_type_get_length(G_CHECKSUM_MD5))

AGS_SIMPLE_FILE_DEFAULT_AUDIO_FORMAT

#define AGS_SIMPLE_FILE_DEFAULT_AUDIO_FORMAT "raw\0"

AGS_SIMPLE_FILE_DEFAULT_AUDIO_ENCODING

#define AGS_SIMPLE_FILE_DEFAULT_AUDIO_ENCODING "base64\0"

enum AgsSimpleFileFlags

Members

AGS_SIMPLE_FILE_READ

   

AGS_SIMPLE_FILE_READ_AUDIO_SIGNAL

   

AGS_SIMPLE_FILE_READ_EMBEDDED_AUDIO

   

AGS_SIMPLE_FILE_WRITE

   

AGS_SIMPLE_FILE_WRITE_AUDIO_SIGNAL

   

AGS_SIMPLE_FILE_WRITE_EMBEDDED_AUDIO

   

AGS_SIMPLE_FILE_ERROR

#define AGS_SIMPLE_FILE_ERROR (ags_simple_file_error_quark())

enum AgsSimpleFileError

Members

AGS_SIMPLE_FILE_ERROR_PARSER_FAILURE

   

AGS_TYPE_SIMPLE_FILE

#define AGS_TYPE_SIMPLE_FILE                (ags_simple_file_get_type())

struct AgsSimpleFile

struct AgsSimpleFile;

struct AgsSimpleFileClass

struct AgsSimpleFileClass {
  GObjectClass object;

  void (*open)(AgsSimpleFile *simple_file,
	       GError **error);
  void (*open_from_data)(AgsSimpleFile *simple_file,
			 gchar *data, guint length,
			 GError **error);
  void (*rw_open)(AgsSimpleFile *simple_file,
		  gboolean create,
		  GError **error);

  void (*write)(AgsSimpleFile *simple_file);
  void (*write_resolve)(AgsSimpleFile *simple_file);

  void (*read)(AgsSimpleFile *simple_file);
  void (*read_resolve)(AgsSimpleFile *simple_file);
  void (*read_start)(AgsSimpleFile *simple_file);
};

Property Details

The “application-context” property

  “application-context”      AgsApplicationContext *

The application context assigned with.

Flags: Read / Write

Since: 1.0.0


The “audio-encoding” property

  “audio-encoding”           gchar *

The encoding to use for embedding audio data.

Flags: Read / Write

Default value: "base64"

Since: 1.0.0


The “audio-format” property

  “audio-format”             gchar *

The format of embedded audio data.

Flags: Read / Write

Default value: "raw"

Since: 1.0.0


The “encoding” property

  “encoding”                 gchar *

The charset encoding to use.

Flags: Read / Write

Default value: NULL

Since: 1.0.0


The “filename” property

  “filename”                 gchar *

The assigned filename to open and read from.

Flags: Read / Write

Default value: NULL

Since: 1.0.0


The “xml-doc” property

  “xml-doc”                  gpointer

The assigned xml-doc.

Flags: Read / Write

Since: 1.0.0

Signal Details

The “open” signal

void
user_function (AgsSimpleFile *simple_file,
               gpointer       error,
               gpointer       user_data)

Open simple_file with appropriate filename.

Parameters

simple_file

the AgsSimpleFile

 

error

a GError pointer to return error

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0


The “open-from-data” signal

void
user_function (AgsSimpleFile *simple_file,
               gchar         *create,
               guint          error,
               gpointer       arg3,
               gpointer       user_data)

Open simple_file in read-write mode.

Parameters

simple_file

the AgsSimpleFile

 

create

if TRUE the file will be created if not exists

 

error

a GError pointer to return error

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0


The “read” signal

void
user_function (AgsSimpleFile *simple_file,
               gpointer       user_data)

Read a XML document from disk with specified simple_filename.

Parameters

simple_file

the AgsSimpleFile

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0


The “read-resolve” signal

void
user_function (AgsSimpleFile *simple_file,
               gpointer       user_data)

Resolve XPath expressions to their counterpart the newly created instances refering to.

Parameters

simple_file

the AgsSimpleFile

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0


The “read-start” signal

void
user_function (AgsSimpleFile *simple_file,
               gpointer       user_data)

Hook after reading XML document to update or start the application.

Parameters

simple_file

the AgsSimpleFile

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0


The “rw-open” signal

void
user_function (AgsSimpleFile *agssimplefile,
               gboolean       arg1,
               gpointer       arg2,
               gpointer       user_data)

Flags: Run Last


The “write” signal

void
user_function (AgsSimpleFile *simple_file,
               gpointer       user_data)

Write XML Document to disk.

Parameters

simple_file

the AgsSimpleFile

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0


The “write-resolve” signal

void
user_function (AgsSimpleFile *simple_file,
               gpointer       user_data)

Resolve references and generate thus XPath expressions just before writing to disk.

Parameters

simple_file

the AgsSimpleFile

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last

Since: 1.0.0