Media File Library
[Content Management]


Defines

#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`.

Typedefs

typedef void * AlpFileMime

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.


Define Documentation

#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`.


Typedef Documentation

typedef void* AlpFileMime
 


Function Documentation

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.

Parameters:
[in] path The path to the file to get a icon for.
[out] pathout The path where the icon may be loaded from. You must call g_free() on this when done.
Returns:
ALP_STATUS_OK on success.

TODO: failure status

alp_status_t alp_mf_get_file_thumbnail_path const char *  path,
char **  pathout
 

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.

Parameters:
[in] path The path to the file to get a thumbnail for.
[out] pathout The path where the thumbnail may be loaded from. You must call g_free() on this when done.
Returns:
ALP_STATUS_OK Success - the thumbnail already exists, and pathout contains a valid thumbnail image.

ALP_STATUS_MF_PENDING No parameter errors. The request has been queued, and you will receive a notification from THUMBNAILER_PSEUDOAPP when the thumbnail file has been written.

TODO: failure status

Note:
This method defaults the new parameters to alp_mf_get_file_thumbnail_path_extended(). It is retained primarily so that alp_mf_get_file_thumbnail_path_extended() could be introduced without breaking code: New code should use alp_mf_get_file_thumbnail_path_extended(), not alp_mf_get_file_thumbnail_path.

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.

Parameters:
[in] path The path to the file to get a thumbnail for.
[in] notification The notification that will be broadcast when a pending thumbnail is ready.
[out] pathout The path where the thumbnail may be loaded from. You must call g_free() on this when done. May not be NULL.
[out] token A token, one per thumbnail, which may be used to match the notification to the request. May be NULL, but the notification will always include a token.
Returns:
ALP_STATUS_OK Success - the thumbnail already exists, and pathout contains a valid thumbnail image.

ALP_STATUS_MF_PENDING No parameter errors. The request has been queued, and you will receive a notification when the thumbnail file has been written.

ALP_STATUS_MF_INVALID_PARAM File named by the path parameter does not exist

TODO: failure status

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.

Parameters:
[in] full_path The full path to a valid media file.
[out] urlout The URL for the path passed in. You must call g_free() on this when done.
Returns:
ALP_STATUS_OK on success.

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.

Parameters:
[in] desc The filename to be typed.
[out] ftid The file type id.
Returns:
ALP_STATUS_OK on success.

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.

Parameters:
[in] udi The volume identifier (as specified in the AlpVolumeSvcsFSinfo.udi field available from volume services) of the volume to save the file to.
[in] filename The filename (or even just the extension) to be saved.
[out] outpath The full directory path where the file should be saved. You must call g_free() on this when done.
Returns:
ALP_STATUS_OK on success.

ALP_STATUS_VOLUMESVCS_NOT_FOUND if there is no match for the udi argument.

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.

Parameters:
[in] file The full path to a file.
[out] outmime A pointer to a char* that will receive the mime string. You must g_free this when finished with it.
Note:
There may be multiple MIME types for a single extension. If one of these mappings marked as "preferred" in the manifest, this method will return the preferred MIME type. (If there are multiple preferred mappings, this method will choose one randomly. If there are no preferred mappings, this function will choose one of the un-preferred mappings.)
Returns:
ALP_STATUS_OK on success.

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.

Parameters:
[in] mime The path to the file to get a icon for.
[out] pathout The path where the icon may be loaded from. You must call g_free() on this when done.
Returns:
ALP_STATUS_OK on success.

TODO: failure status

alp_status_t alp_mf_get_path_udi const char *  path,
char **  udi
 

This allows you to get volume identifiers from a path.

Parameters:
[in] path The full path to a file. The path must be valid (exist on the filesystem).
[out] udi The equivalent to the udi as specified in the AlpVolumeSvcsFSinfo.udi field available from volume services. You must call g_free() on this when done.
Returns:
ALP_STATUS_OK on success.

ALP_STATUS_MF_INVALID_PARAM If either argument is NULL or the path does not exist.

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).

Parameters:
[in] url The URL for a valid media file as returned by alp_mf_get_file_url(). This can also be one of the ALP_SYS_SOUND_* constants.
[out] pathout A posix compatible path to the file specified by the URL. You must call g_free() on this when done.
Returns:
ALP_STATUS_OK on success.

ALP_STATUS_MF_INVALID_PARAM If the url passed in is not valid.

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.

Parameters:
[in] url The URL as returned from alp_mf_get_file_url();
[out] udi The equivalent to the udi as specified in the AlpVolumeSvcsFSinfo.udi field available from volume services. You must call g_free() on this when done.
Returns:
ALP_STATUS_OK on success.

alp_status_t alp_mf_mime_fini AlpFileMime  handle  ) 
 

Destroy a file mime object when finished with it.

Parameters:
[in] handle The object to destroy.
Returns:
ALP_STATUS_OK.

char* alp_mf_mime_get_mime_string AlpFileMime  handle  ) 
 

Extract the complete mime string.

Parameters:
[in] handle An initialized file mime object.
Returns:
A char* to the string. You must g_free the pointer when finished with it.

char* alp_mf_mime_get_subtype AlpFileMime  handle  ) 
 

Extract just the subtype of the file mime.

Parameters:
[in] handle An initialized file mime object.
Note:
There may be multiple MIME types for a single extension. If one of these mappings marked as "preferred" in the manifest, this method will return the preferred MIME type. (If there are multiple preferred mappings, this method will choose one randomly. If there are no preferred mappings, this function will choose one of the un-preferred mappings.)
Returns:
A char* to the string. You must g_free the pointer when finished with it.

char* alp_mf_mime_get_supertype AlpFileMime  handle  ) 
 

Extract just the supertype of the file mime.

Parameters:
[in] handle An initialized file mime object.
Note:
There may be multiple MIME types for a single extension. If one of these mappings marked as "preferred" in the manifest, this method will return the preferred MIME type. (If there are multiple preferred mappings, this method will choose one randomly. If there are no preferred mappings, this function will choose one of the un-preferred mappings.)
Returns:
A char* to the string. You must g_free the pointer when finished with it.

alp_status_t alp_mf_mime_init const char *  file,
AlpFileMime handle
 

Create a media file mime object.

Parameters:
[in] file The full path to a file.
[out] handle The handle to initialize.
Returns:
ALP_STATUS_OK on success.

bool alp_mf_mime_is_supported AlpFileMime  handle  ) 
 

Determine if the file is supported by the mime database.

Parameters:
[in] handle An initialized file mime object.
Returns:
true if the file is supported.

false if the file is not supported.

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.

Parameters:
[in] handle An initialized file mime object.
[in] file The file to set the file mime to refer to.
Returns:
ALP_STATUS_OK on success


Generated on Wed Jul 30 07:06:42 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.