Download

Support

lib/efreet_mime.c File Reference

#include <Efreet.h>
#include <Ecore_Data.h>
#include <Efreet_Mime.h>
#include "efreet_private.h"
#include <arpa/inet.h>
#include <sys/types.h>
#include <sys/time.h>

Include dependency graph for efreet_mime.c:


Data Structures

struct  Efreet_Mime_Glob
struct  Efreet_Mime_Magic
struct  Efreet_Mime_Magic_Entry

Defines

#define EFREET_MIME_MAGIC_BUFFER_SIZE   512

Typedefs

typedef struct Efreet_Mime_Glob Efreet_Mime_Glob
 A parsed representation of a globs file.
typedef struct Efreet_Mime_Magic Efreet_Mime_Magic
 A parsed representation of a magic file section.
typedef struct
Efreet_Mime_Magic_Entry 
Efreet_Mime_Magic_Entry
 A parsed representation of a magic file entry.

Enumerations

enum  { EFREET_ENDIAN_BIG = 0, EFREET_ENDIAN_LITTLE = 1 }

Functions

EAPI const char * efreet_mime_fallback_type_get (const char *file)
 Retreive the fallback mime type of a file.
EAPI const char * efreet_mime_globs_type_get (const char *file)
 Retreive the mime type of a file using globs.
EAPI int efreet_mime_init (void)
 Initializes the efreet mime settings.
EAPI const char * efreet_mime_magic_type_get (const char *file)
 Retreive the mime type of a file using magic.
EAPI void efreet_mime_shutdown (void)
 Cleans up the efreet mime settings system.
EAPI const char * efreet_mime_special_type_get (const char *file)
 Retreive the special mime type of a file.
EAPI const char * efreet_mime_type_get (const char *file)
 Retreive the mime type of a file.
EAPI char * efreet_mime_type_icon_get (const char *mime, const char *theme, const char *size)
 Retreive the mime type icon for a file.

Define Documentation

#define EFREET_MIME_MAGIC_BUFFER_SIZE   512


Typedef Documentation

A parsed representation of a globs file.

Efreet_Mime_Glob

A parsed representation of a magic file section.

Efreet_Mime_Magic

A parsed representation of a magic file entry.

Efreet_Mime_Magic_Entry


Enumeration Type Documentation

anonymous enum

Enumerator:
EFREET_ENDIAN_BIG 
EFREET_ENDIAN_LITTLE 


Function Documentation

EAPI const char* efreet_mime_fallback_type_get ( const char *  file  ) 

Retreive the fallback mime type of a file.

Parameters:
file,: The file to check the mime type
methods,: The methods to use, see Efreet_Mime_Method structure
Returns:
Returns mime type as a string

EAPI const char* efreet_mime_globs_type_get ( const char *  file  ) 

Retreive the mime type of a file using globs.

Parameters:
file,: The file to check the mime type
Returns:
Returns mime type as a string

References Efreet_Mime_Glob::glob, and Efreet_Mime_Glob::mime.

Referenced by efreet_mime_type_get().

EAPI int efreet_mime_init ( void   ) 

Initializes the efreet mime settings.

Returns:
Returns 1 on success or 0 on failure

References efreet_init().

EAPI const char* efreet_mime_magic_type_get ( const char *  file  ) 

Retreive the mime type of a file using magic.

Parameters:
file,: The file to check the mime type
Returns:
Returns mime type as a string

EAPI void efreet_mime_shutdown ( void   ) 

Cleans up the efreet mime settings system.

Returns:
Returns no value

References efreet_shutdown(), IF_FREE_HASH, and IF_FREE_LIST.

EAPI const char* efreet_mime_special_type_get ( const char *  file  ) 

Retreive the special mime type of a file.

Parameters:
file,: The file to check the mime type
methods,: The methods to use, see Efreet_Mime_Method structure
Returns:
Returns mime type as a string

EAPI const char* efreet_mime_type_get ( const char *  file  ) 

Retreive the mime type of a file.

Parameters:
file,: The file to find the mime type
Returns:
Returns mime type as a string

References efreet_mime_globs_type_get().

EAPI char* efreet_mime_type_icon_get ( const char *  mime,
const char *  theme,
const char *  size 
)

Retreive the mime type icon for a file.

Parameters:
file,: The file to find the mime type icon
Returns:
Returns mime type icon path as a string

References efreet_desktop_environment_get(), efreet_icon_list_find(), FREE, and PATH_MAX.


Copyright © Enlightenment.org

Efreet Documentation Generated: Sat May 17 16:35:32 2008