![]() |
![]() |
![]() |
Rhythmbox Development Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
struct RhythmDBImportJob; struct RhythmDBImportJobClass; RhythmDBImportJob * rhythmdb_import_job_new (RhythmDB *db
,RhythmDBEntryType *entry_type
,RhythmDBEntryType *ignore_type
,RhythmDBEntryType *error_type
); void rhythmdb_import_job_add_uri (RhythmDBImportJob *job
,const char *uri
); void rhythmdb_import_job_start (RhythmDBImportJob *job
); void rhythmdb_import_job_cancel (RhythmDBImportJob *job
); gboolean rhythmdb_import_job_complete (RhythmDBImportJob *job
); gboolean rhythmdb_import_job_scan_complete (RhythmDBImportJob *job
); int rhythmdb_import_job_get_total (RhythmDBImportJob *job
); int rhythmdb_import_job_get_imported (RhythmDBImportJob *job
); int rhythmdb_import_job_get_processed (RhythmDBImportJob *job
);
"db" RhythmDB* : Read / Write / Construct Only "entry-type" RhythmDBEntryType* : Read / Write / Construct Only "error-type" RhythmDBEntryType* : Read / Write / Construct Only "ignore-type" RhythmDBEntryType* : Read / Write / Construct Only
"complete" :Run Last
"entry-added" :Run Last
"scan-complete" :Run Last
"status-changed" :Run Last
Tracks the addition to the database of files under a set of directories, providing status information.
The entry types to use for the database entries added by the import job are specified on creation.
struct RhythmDBImportJobClass { GObjectClass parent_class; /* signals */ void (*entry_added) (RhythmDBImportJob *job, RhythmDBEntry *entry); void (*status_changed) (RhythmDBImportJob *job, int total, int imported); void (*scan_complete) (RhythmDBImportJob *job, int total); void (*complete) (RhythmDBImportJob *job, int total); };
RhythmDBImportJob * rhythmdb_import_job_new (RhythmDB *db
,RhythmDBEntryType *entry_type
,RhythmDBEntryType *ignore_type
,RhythmDBEntryType *error_type
);
Creates a new import job with the specified entry types. Before starting the job, the caller must add one or more paths to import.
|
the RhythmDB object |
|
the RhythmDBEntryType to use for normal entries |
|
the RhythmDBEntryType to use for ignored files (or NULL to not create ignore entries) |
|
the RhythmDBEntryType to use for import error entries (or NULL for none) |
Returns : |
new RhythmDBImportJob object. |
void rhythmdb_import_job_add_uri (RhythmDBImportJob *job
,const char *uri
);
Adds a URI to import. All files under the specified URI will be imported.
|
a RhythmDBImportJob |
|
the URI to import |
void rhythmdb_import_job_start (RhythmDBImportJob *job
);
Starts the import job. After this method has been called, no more URIs may be added to the import job. May only be called once for a given import job.
|
the RhythmDBImportJob |
void rhythmdb_import_job_cancel (RhythmDBImportJob *job
);
Cancels the import job. The job will cease as soon as possible. More directories may be scanned and more files may be imported before the job actually ceases.
|
the RhythmDBImportJob |
gboolean rhythmdb_import_job_complete (RhythmDBImportJob *job
);
Returns whether the import job is complete.
|
the RhythmDBImportJob |
Returns : |
TRUE if complete. |
gboolean rhythmdb_import_job_scan_complete (RhythmDBImportJob *job
);
Returns whether the directory scan phase of the import job is complete.
|
the RhythmDBImportJob |
Returns : |
TRUE if complete |
int rhythmdb_import_job_get_total (RhythmDBImportJob *job
);
Returns the total number of files that will be processed by this import job. This increases as the import directories are scanned.
|
the RhythmDBImportJob |
Returns : |
the total number of files to be processed |
int rhythmdb_import_job_get_imported (RhythmDBImportJob *job
);
Returns the number of files successfully imported by the import job so far.
|
the RhythmDBImportJob |
Returns : |
file count |
int rhythmdb_import_job_get_processed (RhythmDBImportJob *job
);
Returns the number of files processed by the import job so far.
|
the RhythmDBImportJob |
Returns : |
file count |
"entry-type"
property"entry-type" RhythmDBEntryType* : Read / Write / Construct Only
Entry type to use for entries added by this job.
"error-type"
property"error-type" RhythmDBEntryType* : Read / Write / Construct Only
Entry type to use for import error entries added by this job.
"ignore-type"
property"ignore-type" RhythmDBEntryType* : Read / Write / Construct Only
Entry type to use for ignored entries added by this job.
"complete"
signalvoid user_function (RhythmDBImportJob *job,
gint arg1,
gpointer user_data) : Run Last
Emitted when the whole import job is complete.
|
the RhythmDBImportJob |
|
user data set when the signal handler was connected. |
"entry-added"
signalvoid user_function (RhythmDBImportJob *job,
RhythmDBEntry *entry,
gpointer user_data) : Run Last
Emitted when an entry has been added to the database by the import job.
|
the RhythmDBImportJob |
|
the newly added RhythmDBEntry |
|
user data set when the signal handler was connected. |
"scan-complete"
signalvoid user_function (RhythmDBImportJob *job,
gint arg1,
gpointer user_data) : Run Last
Emitted when the directory scan is complete. Once the scan is complete, the total number of files to be processed will not change.
|
the RhythmDBImportJob |
|
user data set when the signal handler was connected. |
"status-changed"
signalvoid user_function (RhythmDBImportJob *job,
gint total,
gint imported,
gpointer user_data) : Run Last
Emitted when the status of the import job has changed.
|
the RhythmDBImportJob |
|
the current total number of files to process |
|
the current count of files imported |
|
user data set when the signal handler was connected. |