![]() |
![]() |
![]() |
![]() |
Synchronize a specified file.
#include <mme/mme.h> int mme_sync_file( mme_hdl_t *hdl, uint64_t old_fid, uint64_t new_msid, const char *new_filename );
mme
The function mme_sync_file() starts a synchronization for a specified file.
File synchronization allows the client application to have the MME synchronize only a specified file. This capability is typically used when the client application knows that a specific file change has occured: a file has been deleted, added, moved or renamed.
In all cases, the client application must specify, as a minimum, one of the old_fid or the new_filename. The values the client application should assign to these variables before passing them to mme_sync_file() depending on the reason it is calling the function:
No synchronization options are available for this function; it attempts to do the equivalent of both file and metadata synchronization passes.
During synchronization, the mme_sync_file() delivers synchronization events:
If new_msid is 0 and new_filename is NULL, mme_sync_file() removes the file specified by fid. The function returns 0 on successful completion.
The function mme_sync_file() can only be used with certain media store types. For example, the function it is not supported for use with iPods.
There is no support for changes across mediastores. For example, when both the msid and old_msid are specified, the msid for the old file must match the old_msid.
File move or rename is supported only when the file remains on the same media store. In this case, all metadata about the file is preserved. If the file is moved to a different mediastore, two separate calls to mme_sync_file() are required and:
This function returns synchronization events with the operation ID. See “File changes and additions” above, and the chapter MME Synchronization Events for a full list.
This function is non-blocking. It returns synchronously. On completion, it returns 0 or a positive integer, which is the operation ID. This return value is sent with:
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |
mme_directed_sync_cancel(), mme_resync_mediastore(), mme_setpriorityfolder(), mme_sync_cancel(), mme_sync_directed(), mme_sync_get_msid_status(), mme_sync_get_status()
![]() |
![]() |
![]() |
![]() |