#include <errno.h>
#include <sqlite3.h>
#include <stdint.h>
#include <stdbool.h>
#include <string.h>
#include <glib/gtypes.h>
#include <alp/sal.h>
#include <alp/types.h>
#include <alp/sysclass.h>
#include <alp/volumesvcs_types.h>
Go to the source code of this file.
Data Structures | |
| struct | _AlpNotifyEventFileRenamed |
| struct | _AlpNotifyEventIndexFileResults |
| struct | _AlpNotifyEventIndexFileResultsHeader |
| struct | _AlpNotifyEventUnindexFileResults |
| struct | _AlpNotifyEventUnindexFileResultsHeader |
| struct | alp_ms_dml_statement_parameters |
Structure that defines a query for the alp_ms_dml_statement api-s. (Use the alp_ms_dml_statement_parameters_* methods to set it.). More... | |
Defines | |
| #define | ALP_MEDIASELECTOR_APP_ID "mediacatd" |
| App name used when the media cataloger daemon broadcasts notifications. | |
| #define | ALP_MEDIASELECTOR_REGISTERED_DIRECTORY_HOME "/var/home" |
| The home directory (and everything under it!) is always registered. | |
| #define | ALP_MEDIASELECTOR_REGISTERED_DIRECTORY_RINGTONES "/usr/share/sounds/ringtones" |
| The directory for stock ringtones. | |
| #define | ALP_MEDIASELECTOR_REGISTERED_DIRECTORY_STANDARD_IMAGES "/usr/share/images" |
| The directory for stock images. | |
| #define | ALP_MEDIASELECTOR_REGISTERED_DIRECTORY_STANDARD_VIDEO "/usr/share/video" |
| The directory for stock video. | |
| #define | ALP_MF_THUMBNAILER_PSEUDOAPP "background.thumbnailer" |
| Name of the 'app' that broadcasts thumbnail-complete messages. | |
| #define | ALP_MF_URL_CARD_PREFIX "card://" |
| URL prefix for a card-resident file. | |
| #define | ALP_MF_URL_DEVICE_PREFIX "file://" |
| URL prefix for a device-resident file`. | |
| #define | ALP_MS_CAT_INDEX_FILE_RESULTS_VERSION_1PT0 0x00010000 |
Version constant for the AlpNotifyEventIndexFileResultsHeader struct, sent in an ALP_NOTIFY_EVENT_MS_INDEX_FILE message. | |
| #define | ALP_MS_CAT_UNINDEX_FILE_RESULTS_VERSION_1PT0 0x00010000 |
| #define | ALP_MS_CATEGORY_ALL "all" |
| Standard category - all. | |
| #define | ALP_MS_CATEGORY_APPLICATION "application" |
| Standard category - application. | |
| #define | ALP_MS_CATEGORY_AUDIO "audio" |
| Standard category - audio. | |
| #define | ALP_MS_CATEGORY_AUDIO_PIC "audio_pic" |
| Standard category - audio pic. | |
| #define | ALP_MS_CATEGORY_COLLECTION "collection" |
| This is a 'special' category - not a table, just a MIME prefix. | |
| #define | ALP_MS_CATEGORY_DOCUMENT "application" |
| Deprecated category name - please use ALP_MS_CATEGORY_APPLICATION in new code | |
| #define | ALP_MS_CATEGORY_IMAGE "image" |
| Standard category - image. | |
| #define | ALP_MS_CATEGORY_OTHER "other" |
| Standard category - other - all files not handled by the system. | |
| #define | ALP_MS_CATEGORY_RINGTONE "ringtone" |
| Standard category - ringtone. | |
| #define | ALP_MS_CATEGORY_VIDEO "video" |
| Standard category - video. | |
| #define | ALP_MS_CATEGORY_VOICE "voice" |
| Standard category - voice. | |
| #define | ALP_MS_DML_COL_ANY_FILEID "file_id" |
| int32 Identifier of file for metadata | |
| #define | ALP_MS_DML_COL_AUDIO_ALBUM "album" |
| string Album name | |
| #define | ALP_MS_DML_COL_AUDIO_ARTIST "artist" |
| string | |
| #define | ALP_MS_DML_COL_AUDIO_BITRATE "bitrate" |
| string | |
| #define | ALP_MS_DML_COL_AUDIO_COMPOSER "composer" |
| string | |
| #define | ALP_MS_DML_COL_AUDIO_COUNT "play_count" |
| int32 Number of times the file has been played | |
| #define | ALP_MS_DML_COL_AUDIO_CTIME "ctime" |
| int32 Creation time of file | |
| #define | ALP_MS_DML_COL_AUDIO_DURATION "duration" |
| int32 Duration in seconds of audio playback. | |
| #define | ALP_MS_DML_COL_AUDIO_GENRE "genre" |
| string | |
| #define | ALP_MS_DML_COL_AUDIO_NOTES "notes" |
| string | |
| #define | ALP_MS_DML_COL_AUDIO_PIC_PATH "pic_file_location" |
| string | |
| #define | ALP_MS_DML_COL_AUDIO_SAMPLERATE "samplerate" |
| string | |
| #define | ALP_MS_DML_COL_AUDIO_TITLE "title" |
| string Audio title | |
| #define | ALP_MS_DML_COL_AUDIO_TOTAL_TRACKS "totaltracks" |
| int32 | |
| #define | ALP_MS_DML_COL_AUDIO_TRACKNUM "tracknum" |
| int32 | |
| #define | ALP_MS_DML_COL_AUDIO_YEAR "year" |
| int32 | |
| #define | ALP_MS_DML_COL_COLLECTION_COUNT "count" |
| int32 | |
| #define | ALP_MS_DML_COL_COLLECTION_TITLE "title" |
| string | |
| #define | ALP_MS_DML_COL_DOCUMENT_DESCRIPTION "title" |
| string, (obsolete) document title | |
| #define | ALP_MS_DML_COL_DOCUMENT_NOTES "notes" |
| string | |
| #define | ALP_MS_DML_COL_DOCUMENT_TITLE "title" |
| string, document title | |
| #define | ALP_MS_DML_COL_DOCUMENT_TYPE "mimetype" |
| string Mimetype of document, useful for filters | |
| #define | ALP_MS_DML_COL_IMAGE_HEIGHT "height" |
| int32 | |
| #define | ALP_MS_DML_COL_IMAGE_NOTES "notes" |
| string | |
| #define | ALP_MS_DML_COL_IMAGE_TITLE "title" |
| string | |
| #define | ALP_MS_DML_COL_IMAGE_WIDTH "width" |
| int32 | |
| #define | ALP_MS_DML_COL_RINGTONE_DURATION "duration" |
| int32 | |
| #define | ALP_MS_DML_COL_RINGTONE_TITLE "title" |
| string | |
| #define | ALP_MS_DML_COL_VIDEO_CREATION_TIME "ctime" |
| time_t Creation time of the video | |
| #define | ALP_MS_DML_COL_VIDEO_CTIME "ctime" |
| int32 Creation time of file | |
| #define | ALP_MS_DML_COL_VIDEO_DURATION "duration" |
| int32 Time in seconds of the video playback. | |
| #define | ALP_MS_DML_COL_VIDEO_GENRE "genre" |
| string | |
| #define | ALP_MS_DML_COL_VIDEO_HEIGHT "height" |
| int32 height of video frame | |
| #define | ALP_MS_DML_COL_VIDEO_NOTES "notes" |
| string | |
| #define | ALP_MS_DML_COL_VIDEO_PLAY_COUNT "play_count" |
| int32 Number of times the video has been played. | |
| #define | ALP_MS_DML_COL_VIDEO_TITLE "title" |
| string Title of the video. | |
| #define | ALP_MS_DML_COL_VIDEO_WIDTH "width" |
| int32 width of video frame | |
| #define | ALP_MS_DML_COL_VOICE_BITRATE "bitrate" |
| string | |
| #define | ALP_MS_DML_COL_VOICE_DURATION "duration" |
| int32 | |
| #define | ALP_MS_DML_COL_VOICE_SAMPLERATE "samplerate" |
| string | |
| #define | ALP_MS_DML_COL_VOICE_TITLE "title" |
| string | |
| #define | ALP_MS_EVENT_PREFIX "/alp/" ALP_MEDIASELECTOR_APP_ID "/" |
| Media Selector event prefix. | |
| #define | ALP_MS_ITEM_TYPE_APPLICATION ALP_MS_CATEGORY_APPLICATION |
| The application category. | |
| #define | ALP_MS_ITEM_TYPE_AUDIO ALP_MS_CATEGORY_AUDIO |
| The audio category. | |
| #define | ALP_MS_ITEM_TYPE_AUDIO_PIC ALP_MS_CATEGORY_AUDIO_PIC |
| The audio pic category. | |
| #define | ALP_MS_ITEM_TYPE_DOCUMENT ALP_MS_CATEGORY_APPLICATION |
| Deprecated: the old document category | |
| #define | ALP_MS_ITEM_TYPE_IMAGE ALP_MS_CATEGORY_IMAGE |
| The image category. | |
| #define | ALP_MS_ITEM_TYPE_RINGTONE ALP_MS_CATEGORY_RINGTONE |
| The ringtone category. | |
| #define | ALP_MS_ITEM_TYPE_VIDEO ALP_MS_CATEGORY_VIDEO |
| The video category. | |
| #define | ALP_MS_ITEM_TYPE_VOICE ALP_MS_CATEGORY_VOICE |
| The voice category. | |
| #define | ALP_MS_PROP_CATEGORY "category" |
| MediaSelector widget property. | |
| #define | ALP_MS_PROP_FILTER "filter" |
| MediaSelector widget property. | |
| #define | ALP_MS_PROP_ICON_MARGIN "icon_margin" |
| MediaSelector widget property. | |
| #define | ALP_MS_PROP_ICON_SPACING "icon_spacing" |
| MediaSelector widget property. | |
| #define | ALP_MS_PROP_MATCH "match" |
| MediaSelector widget property. | |
| #define | ALP_MS_PROP_MATCH_FIELD "match_field" |
| MediaSelector widget property. | |
| #define | ALP_MS_PROP_POPUP_MENU "ms_popup_menu" |
| MediaSelector widget property. | |
| #define | ALP_MS_PROP_SORT_ASCENDING "sort_ascending" |
| MediaSelector widget property. | |
| #define | ALP_MS_PROP_SORTBY "sortby" |
| MediaSelector widget property. | |
| #define | ALP_MS_PROP_VIEW_MODE "view_mode" |
| MediaSelector widget property. | |
| #define | ALP_MS_REFRESH_CONTENT ALP_MS_EVENT_PREFIX "refresh" |
| Notification broadcast on volume mount, volume unmount, and when the media cataloger is done scanning: basically means that content will be changing / content has changed. | |
| #define | ALP_MS_SIGNAL_SELECTION_ACTIVATED "selection_activated" |
| Signaled whenever the selection is activated (center-press). | |
| #define | ALP_MS_SIGNAL_SELECTION_CHANGED "selection_changed" |
| Signaled whenever the selection changes. | |
| #define | ALP_MS_SORTBY_LOCATION "location" |
| Common sortby selection. | |
| #define | ALP_MS_SORTBY_NAME "name" |
| Common sortby selection. | |
| #define | ALP_MS_SORTBY_SIZE "size" |
| Common sortby selection. | |
| #define | ALP_MS_SORTBY_TIME "mtime" |
| Common sortby selection. | |
| #define | ALP_MS_SORTBY_TYPE "type" |
| Common sortby selection. | |
| #define | ALP_NOTIFY_EVENT_DIRECTORY_UPDATED ALP_MS_EVENT_PREFIX "update_dir" |
| alp_ms_cat_register_directory broadcasts this event to notify the cataloger to update a directory. | |
| #define | ALP_NOTIFY_EVENT_MS_FILE_DELETED ALP_MS_EVENT_PREFIX "file_deleted" |
| The message sent by mediacatd when it notices that a file has been deleted. | |
| #define | ALP_NOTIFY_EVENT_MS_INDEX_FILE ALP_MS_EVENT_PREFIX "index_file" |
| The message sent by mediacatd when alp_ms_cat_index_file completes. | |
| #define | ALP_NOTIFY_EVENT_MS_METADATA_READ_PROGRESS ALP_MS_EVENT_PREFIX "reading_metadata" |
| Notification broadcast periodically as the media cataloger daemon reads metadata. | |
| #define | ALP_NOTIFY_EVENT_MS_REFRESH ALP_MS_REFRESH_CONTENT |
| Standards-compliant synonym for ALP_MS_REFRESH_CONTENT. | |
| #define | ALP_NOTIFY_EVENT_MS_RENAME_FILE ALP_MS_EVENT_PREFIX "rename_file" |
| The event (optionally) raised by the alp_ms_cat_rename_file() method. | |
| #define | ALP_NOTIFY_EVENT_MS_SCANNING_DIRECTORY ALP_MS_EVENT_PREFIX "scanning_directory" |
| Notification broadcast when the media cataloger daemon reads a directory. | |
| #define | ALP_NOTIFY_EVENT_MS_UNINDEX_FILE ALP_MS_EVENT_PREFIX "unindex_file" |
| The message sent by mediacatd when alp_ms_cat_unindex_file completes. | |
| #define | ALP_STATUS_MS_CAT 0x00010000 |
| Media Selector error category: Cataloger error codes. | |
| #define | ALP_STATUS_MS_CAT_ERROR (ALP_CLASS_MEDIASELECTOR | ALP_STATUS_MS_CAT) |
| Media Selector class & category: Cataloger error codes. | |
| #define | ALP_STATUS_MS_DML 0x00030000 |
| Media Selector error category: DML error codes. | |
| #define | ALP_STATUS_MS_DML_ERROR (ALP_CLASS_MEDIASELECTOR | ALP_STATUS_MS_DML) |
| Media Selector class & category: Catalog IPC error codes. | |
| #define | ALP_STATUS_MS_FILE 0x00040000 |
| Media Selector error category: Media file error codes. | |
| #define | ALP_STATUS_MS_FILE_ERROR (ALP_CLASS_MEDIASELECTOR | ALP_STATUS_MS_FILE) |
| Media Selector class & category: Media file error codes. | |
| #define | ALP_STATUS_MS_IPC 0x00020000 |
| Media Selector error category: Catalog IPC error codes. | |
| #define | ALP_STATUS_MS_IPC_ERROR (ALP_CLASS_MEDIASELECTOR | ALP_STATUS_MS_IPC) |
| Media Selector class & category: DML error codes. | |
| #define | ALP_STATUS_MS_MISC 0x00000000 |
| Media Selector error category: There should not be any Misc errors. | |
| #define | ALP_STATUS_MS_MISC_ERROR (ALP_CLASS_MEDIASELECTOR | ALP_STATUS_MS_MISC) |
| Media Selector class & category: There should nott be any Misc errors. | |
| #define | ALP_STATUS_MS_UI 0x00050000 |
| Media Selector error category: UI (widget/dialog) error codes. | |
| #define | ALP_STATUS_MS_UI_ERROR (ALP_CLASS_MEDIASELECTOR | ALP_STATUS_MS_UI) |
| Media Selector class & category: UI (widget/dialog) error codes. | |
| #define | DEPRECATED |
| #define | FILE_RENAMED_NOTIFICATION_VERSION_1PT0 0x00010000 |
Version constant for the AlpNotifyEventFileRenamed struct, sent by the alp_ms_cat_rename_file() method. | |
| #define | MS_READ_PROGRESS_PARTS 10000 |
| Metadata completion is expressed as parts per MS_READ_PROGRESS_PARTS. | |
Typedefs | |
| typedef int(* | alp_ms_cat_file_copy_callback )(const char *destination_filename, const char *source_filename, int64_t bytes_copied, int64_t total_bytes, void *data) |
Optional, progress reporting callback for alp_ms_cat_file_copy_callback. | |
| typedef void * | AlpFileMime |
| typedef int(* | AlpMsCallbackFunction )(void *user_data, int argc, char **argv, char **azColName) |
| Protoype for alp_ms_dml_statement_exec callback method. This callback should normally return 0; a non-zero value will terminate the query. | |
| typedef void * | AlpMSRegDirH |
| typedef _AlpNotifyEventFileRenamed | AlpNotifyEventFileRenamed |
| This is the structure of a ALP_NOTIFY_EVENT_MS_RENAME_FILE, optionallly sent by the alp_ms_cat_rename_file() method. | |
| typedef _AlpNotifyEventIndexFileResults | AlpNotifyEventIndexFileResults |
An ALP_NOTIFY_EVENT_MS_INDEX_FILE message contains this in its details pointer. | |
| typedef _AlpNotifyEventIndexFileResultsHeader | AlpNotifyEventIndexFileResultsHeader |
The fixed-size part of an AlpNotifyEventIndexFileResults struct. | |
| typedef _AlpNotifyEventUnindexFileResults | AlpNotifyEventUnindexFileResults |
An ALP_NOTIFY_EVENT_MS_UNINDEX_FILE message contains this in its details pointer. | |
| typedef _AlpNotifyEventUnindexFileResultsHeader | AlpNotifyEventUnindexFileResultsHeader |
The fixed-size part of an AlpNotifyEventUnindexFileResults struct. | |
Enumerations | |
| enum | { ALP_STATUS_MS_CAT_OK = ALP_STATUS_OK, ALP_STATUS_MS_CAT_NO_COMM = ALP_STATUS_MS_CAT_ERROR + 1, ALP_STATUS_MS_CAT_DB_DONE, ALP_STATUS_MS_CAT_INVALID_PATH, ALP_STATUS_MS_CAT_NOT_SUPPORTED, ALP_STATUS_MS_CAT_DB_ERROR, ALP_STATUS_MS_CAT_NOTIFICATION_ERROR, ALP_STATUS_MS_CAT_FILE_NOT_FOUND, ALP_STATUS_MS_CAT_FILE_IO_ERROR, ALP_STATUS_MS_CAT_INTERNAL_ERROR, ALP_STATUS_MS_CAT_NO_MEMORY, ALP_STATUS_MS_CAT_BAD_PARAMETER, ALP_STATUS_MS_CAT_USER_ABORT, ALP_STATUS_MS_CAT_TARGET_FILE_EXISTS, ALP_STATUS_MS_CAT_UNKNOWN_SOURCE_FILE, ALP_STATUS_MS_CAT_TARGET_NAME_COLLISION } |
| Return codes specific to the Cataloger API. More... | |
| enum | { ALP_STATUS_MS_IPC_NOT_MOUNTED = ALP_STATUS_MS_IPC_ERROR + 1, ALP_STATUS_MS_IPC_INVALID_OPERATION } |
| Return codes specific to the Cataloger entry points that 'talk to' mediacatd over IPC. More... | |
| enum | { ALP_STATUS_MS_OK = ALP_STATUS_OK, ALP_STATUS_MS_DML_UNIMPLEMENTED = ALP_STATUS_MS_DML_ERROR + 1, ALP_STATUS_MS_DML_NO_RECORDS, ALP_STATUS_MS_DML_NO_MORE_RECORDS, ALP_STATUS_MS_DML_NO_MEM, ALP_STATUS_MS_DML_INTERNAL_ERR, ALP_STATUS_MS_DML_DATABASE_ERR, ALP_STATUS_MS_DML_BAD_PARAM, ALP_STATUS_MS_DML_COLUMN_INVALID, ALP_STATUS_MS_DML_COLUMN_MISMATCH, ALP_STATUS_MS_DML_NOT_A_NUMBER, ALP_STATUS_MS_DML_OUT_OF_RANGE, ALP_STATUS_MS_DML_NOT_INDEXED, ALP_STATUS_MS_DML_SYSTEM_COLUMN, ALP_STATUS_MS_DML_FILE_DOES_NOT_EXIST } |
| Status return values for Media Selector DML. More... | |
| enum | { ALP_STATUS_MF_UNAVAILABLE = ALP_STATUS_MS_FILE_ERROR + 1, ALP_STATUS_MF_INVALID_PARAM, ALP_STATUS_MF_PENDING } |
| Return codes for the Media File API. More... | |
| enum | alp_ms_dml_statement_exec_offsets { alp_ms_dml_statement_exec_location_offset = -2, alp_ms_dml_statement_exec_file_id_offset = -1 } |
| Offsets to 'system fields' hidden by the alp_ms_dml_statement_exec callback. More... | |
| enum | AlpMediaSelectorViewModeType { ALP_MS_SINGLE_VIEW = 0, ALP_MS_MULTI_VIEW, ALP_MS_GALLERY_VIEW } |
| View modes. More... | |
| enum | AlpMsCatIndexFileStatus { ALP_MS_CAT_IFS_SUCCESS, ALP_MS_CAT_IFS_FILE_DOES_NOT_EXIST, ALP_MS_CAT_IFS_NOT_IN_REGISTERED_DIRECTORY, ALP_MS_CAT_IFS_INDEXING_ERROR, ALP_MS_CAT_IFS_DATABASE_ERROR } |
| enum | AlpMsCatUnindexFileStatus { ALP_MS_CAT_UFS_SUCCESS, ALP_MS_CAT_UFS_NOT_INDEXED, ALP_MS_CAT_UFS_UNINDEXING_ERROR, ALP_MS_CAT_UFS_FILE_DOES_NOT_EXIST } |
| enum | AlpMsSorts { ALP_MS_SORT_DESCENDING = 0, ALP_MS_SORT_ASCENDING } |
| Sort orders. More... | |
| enum | AlpMsStatus { ALP_MS_STATUS_OK = 0, ALP_MS_STATUS_BAD_PARAMETER = ALP_STATUS_MS_UI_ERROR + 1 } |
| Media Selector errors. More... | |
Functions | |
| alp_status_t | alp_mf_get_file_icon_path (const char *path, char **pathout) |
| Provides a path to load an icon from a specific file. | |
| alp_status_t | alp_mf_get_file_thumbnail_path (const char *path, char **pathout) DEPRECATED |
| Deprecated: Provides a path to load a thumbnail for a particular file. This may be an existing file (ie, a cached thumbnail) or it may be a new file, that has to be generated asynchronously. In this latter case, alp_mf_get_file_thumbnail_path will return ALP_STATUS_MF_PENDING and broadcast a ALP_MS_REFRESH_CONTENT notification when the file is ready. | |
| alp_status_t | alp_mf_get_file_thumbnail_path_extended (const char *path, const char *notification, char **pathout, int *token) |
Provides a path to load a thumbnail for a particular file. This may be an existing file (ie, a cached thumbnail) or it may be a new file, that has to be generated asynchronously. In this latter case, alp_mf_get_file_thumbnail_path_extended will return ALP_STATUS_MF_PENDING and broadcast a notification from THUMBNAILER_PSEUDOAPP when the file is ready; the notification will contain a sizeof(int) sized token which will match the token returned when you called this method. | |
| alp_status_t | alp_mf_get_file_url (const char *full_path, char **urlout) |
| Use this to get a mountpoint neutral location identifier (URL) from a path to a valid media file. | |
| alp_status_t | alp_mf_get_media_file_type_id (const char *desc, int32_t *ftid) |
| Given a path to a file, return the MediaSelector file type id for that file. | |
| alp_status_t | alp_mf_get_media_path (const char *udi, const char *filename, char **outpath) |
| Given a file name and a volume ID, return a path to the directory where the file should live. | |
| alp_status_t | alp_mf_get_mime_for_file (const char *file, char **outmime) |
| A convenience shortcut for getting a simple complete mime string for a file. | |
| alp_status_t | alp_mf_get_mime_icon_path (const char *mime, char **pathout) |
| Provides a path to load an icon from a specific mimetype. | |
| alp_status_t | alp_mf_get_path_udi (const char *path, char **udi) |
| This allows you to get volume identifiers from a path. | |
| alp_status_t | alp_mf_get_url_path (const char *url, char **pathout) |
| Use this to get a full path from a mountpoint neutral location identifier (URL). | |
| alp_status_t | alp_mf_get_url_udi (const char *url, char **udi) |
| This allows you to get volume identifiers from a media source URL. | |
| alp_status_t | alp_mf_mime_fini (AlpFileMime handle) |
| Destroy a file mime object when finished with it. | |
| char * | alp_mf_mime_get_mime_string (AlpFileMime handle) |
| Extract the complete mime string. | |
| char * | alp_mf_mime_get_subtype (AlpFileMime handle) |
| Extract just the subtype of the file mime. | |
| char * | alp_mf_mime_get_supertype (AlpFileMime handle) |
| Extract just the supertype of the file mime. | |
| alp_status_t | alp_mf_mime_init (const char *file, AlpFileMime *handle) |
| Create a media file mime object. | |
| bool | alp_mf_mime_is_supported (AlpFileMime handle) |
| Determine if the file is supported by the mime database. | |
| alp_status_t | alp_mf_mime_set_to (AlpFileMime handle, const char *file) |
| Set the file mime to a different file. This is faster than creating a new one. | |
| alp_status_t | alp_ms_cat_copy_file (const char *new_filename, const char *existing_filename, alp_ms_cat_file_copy_callback callback, void *data) |
| Copy a single file and its metadata to a new location, optionally with a new filename. | |
| bool | alp_ms_cat_extension_supported (const char *extension) |
| Checks to see if a certain media format is indexed by The Media Selector. | |
| alp_status_t | alp_ms_cat_get_registered_begin (AlpMSRegDirH *handle) |
| Enumerates over the registered directories, initializes enumeration. | |
| alp_status_t | alp_ms_cat_get_registered_end (AlpMSRegDirH handle) |
| Cleans up after enumeration over the registered directories. | |
| alp_status_t | alp_ms_cat_get_registered_next_dir (AlpMSRegDirH handle, char **directory) |
| Enumerates over the registered directories, gets next entry. | |
| alp_status_t | alp_ms_cat_index_file (const char *filename) |
| Adds a single file to catalog, and extracts its metadata. | |
| alp_status_t | alp_ms_cat_register_directory (const char *path) |
| Adds path to Cataloger media paths and does a recursive scan for media files. | |
| alp_status_t | alp_ms_cat_rename_file (const char *new_filename, const char *existing_url, const char *notification_app) |
| Rename a single file and its metadata, optionally broadcasting an ALP_NOTIFY_EVENT_MS_RENAME_FILE event that contains an AlpNotifyEventFileRenamed structure with the original URL and the new filename. | |
| alp_status_t | alp_ms_cat_unindex_file (const char *filename) |
| Removes a single file and its metadata from catalog. | |
| alp_status_t | alp_ms_cat_unregister_directory (const char *path) |
| Removes path from cataloger db, and removes all data (from metadata.db) about files in (or under) this directory. | |
| alp_status_t | alp_ms_cat_update (const char *path) |
| Call when the contents of a registered directory change, to update the catalog. (When you add a single file, alp_ms_cat_index_file is significantly faster than alp_ms_cat_update().). | |
| alp_status_t | alp_ms_dml_close (AlpDmlH dmlH) |
| Close the MediaSelector DML when updating is complete. | |
| alp_status_t | alp_ms_dml_commit_item (AlpDmlH dmlH, AlpDmlItemH itemH) |
| Commit the filled in metadata to the database. | |
| alp_status_t | alp_ms_dml_flush (AlpDmlH dmlH) |
| Flush the MediaSelector DML transaction buffers. | |
| alp_status_t | alp_ms_dml_item_create (const char *item_type, AlpDmlItemH *itemH, const char *path) |
| Create item metadata entry of a specified type. | |
| alp_status_t | alp_ms_dml_item_destroy (AlpDmlItemH itemH) |
| Clean up after finished with an item. | |
| alp_status_t | alp_ms_dml_item_set_int32 (AlpDmlItemH itemH, const char *dml_column, int32_t *value) |
| Sets integer value metadata. | |
| alp_status_t | alp_ms_dml_item_set_int64 (AlpDmlItemH itemH, const char *dml_column, int64_t *value) |
| Sets integer value metadata. | |
| alp_status_t | alp_ms_dml_item_set_string (AlpDmlItemH itemH, const char *dml_column, const char *value) |
| Sets string value metadata. | |
| alp_status_t | alp_ms_dml_open (AlpDmlH *dmlH) |
| Open the MediaSelector DML for updating the data within. | |
| alp_status_t | alp_ms_dml_statement_begin (AlpDmlH dmlH, AlpDmlStatementH *stmtH, alp_ms_dml_statement_parameters *params, int *numResults) |
| Begin dml statment using the given criteria. | |
| alp_status_t | alp_ms_dml_statement_build_single_file_filter (const char *filename, char **filter) |
Generate a filter to select a single file. (Looks up file_id and dir_id.). | |
| alp_status_t | alp_ms_dml_statement_end (AlpDmlStatementH stmtH) |
| Close statement handle. | |
| alp_status_t | alp_ms_dml_statement_exec (AlpDmlH dmlH, AlpMsCallbackFunction callback, void *data, alp_ms_dml_statement_parameters *params, int *numResults) |
| Run dml statment using the given criteria, and call callback method once per row. | |
| alp_status_t | alp_ms_dml_statement_get_columns (AlpDmlStatementH stmtH, int *columnCount, gchar ***columnNames) |
| Get the list of column names - useful when fields=="*". | |
| alp_status_t | alp_ms_dml_statement_get_file_url (AlpDmlStatementH stmtH, const char **url) |
Get a file URL for current row. This may be used in conjunction with alp_mf_get_url_path() to get a path to the file. Caller owns the returned string, and must free it with g_free! | |
| alp_status_t | alp_ms_dml_statement_get_int32 (AlpDmlStatementH stmtH, const char *dml_column, int32_t *value) |
| Get an int32_t from column by name. | |
| alp_status_t | alp_ms_dml_statement_get_int64 (AlpDmlStatementH stmtH, const char *dml_column, int64_t *value) |
| Get an int64_t from column by name. | |
| alp_status_t | alp_ms_dml_statement_get_string (AlpDmlStatementH stmtH, const char *dml_column, const char **value) |
| Get a string from column by name. Caller does NOT own string, and should not free it! | |
| alp_status_t | alp_ms_dml_statement_next (AlpDmlStatementH stmtH) |
| Advance to the next statement. | |
| alp_status_t | alp_ms_dml_statement_parameters_clear (alp_ms_dml_statement_parameters *parameters) |
| Initialize parameters block - set all fields to default values (binary zero). | |
| alp_status_t | alp_ms_dml_statement_parameters_set_fields (alp_ms_dml_statement_parameters *parameters, const char *category, const char *fields) |
| Set both category and fields. | |
| alp_status_t | alp_ms_dml_statement_parameters_set_match (alp_ms_dml_statement_parameters *parameters, const char *matchField, const char *match) |
| Set both match and matchField. | |
| alp_status_t | alp_ms_dml_statement_parameters_set_regex (alp_ms_dml_statement_parameters *parameters, const char *regexField, const char *regex) |
| Set both regex and regexField - slow but powerful matching. | |
| alp_status_t | alp_ms_dml_statement_parameters_set_select_by_category (alp_ms_dml_statement_parameters *parameters, const char *includedCategories, const char *excludedCategories) |
| Set both includedCategories and excludedCategories. | |
| alp_status_t | alp_ms_dml_statement_parameters_set_skip (alp_ms_dml_statement_parameters *parameters, int start, int limit) |
| Set start/limit - restrict results to a 'window'. | |
| alp_status_t | alp_ms_dml_statement_parameters_set_sort (alp_ms_dml_statement_parameters *parameters, const char *sortby, bool ascending) |
| Set sort info. | |
|
|
|
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.