Mime.h File Reference

#include <BeBuild.h>
#include <sys/types.h>
#include <SupportDefs.h>
#include <StorageDefs.h>

Go to the source code of this file.

Enumerations

enum  icon_size { B_LARGE_ICON = 32, B_MINI_ICON = 16 }

Functions

int update_mime_info (const char *path, int recursive, int synchronous, int force)
status_t create_app_meta_mime (const char *path, int recursive, int synchronous, int force)
status_t get_device_icon (const char *dev, void *icon, int32 size)


Enumeration Type Documentation

enum icon_size
 

Enumerator:
B_LARGE_ICON 
B_MINI_ICON 


Function Documentation

status_t create_app_meta_mime const char *  path,
int  recurse,
int  sync,
int  force
 

Creates an entry in the File Types database for a specific application, or for all applications:

  • To create an entry for a specific application, pass the path to the application in path. Information is taken from the app and written into the database.

  • To create entries for all applications, pass a NULL path.

Parameters:
recurse The Flag is currently unused.
sync If is true, the function doesn't return until the operation is complete. If it's false, the function returns immediately while the operation continues in the background.
force If is true, entries are created even if they already exist.
Returns:
B_OK . No error.

B_BAD_VALUE. You can't request recursive operation when a path is specified.

status_t get_device_icon const char *  device,
void *  icon,
int32  size
 

Returns:
The icons that are associated with the given device. You specify which icon you want (large or small) by passing 32 or 16 as the size argument. The icon is then returned through the icon argument.
See also:
BVolume::GetIcon()

int update_mime_info const char *  path,
int  recurse,
int  sync,
int  force
 

Updates the MIME information for one or more files, specified by path. If path is NULL, all files are scanned recursively, and the value of recurse is ignored.

Parameters:
recurse If is true and path indicates a directory, the directory tree contained by path is scanned, with every file in the tree being updated; otherwise, just the file indicated by path is updated.
sync If is true, update_mime_info() doesn't return until the update operation is complete. If it's false, update_mime_info() runs asynchronously, and returns immediately while updating continues in the background.
If is true, files are updated even if they've been updated already.

If an error occurs, update_mime_info() returns a negative error code; otherwise, it returns B_OK.


Copyright 2005 by yellowTAB GmbH, Be Inc., Palm Source Inc. and their respective legal successors
All rights reserved.