Typedefs | Enumerations | Functions | Variables
Top level functions

Functions that affect Eet as a whole. More...

Typedefs

typedef enum _Eet_Error Eet_Error
 Eet error identifiers.
 

Enumerations

enum  _Eet_Error {
  EET_ERROR_NONE,
  EET_ERROR_BAD_OBJECT,
  EET_ERROR_EMPTY,
  EET_ERROR_NOT_WRITABLE,
  EET_ERROR_OUT_OF_MEMORY,
  EET_ERROR_WRITE_ERROR,
  EET_ERROR_WRITE_ERROR_FILE_TOO_BIG,
  EET_ERROR_WRITE_ERROR_IO_ERROR,
  EET_ERROR_WRITE_ERROR_OUT_OF_SPACE,
  EET_ERROR_WRITE_ERROR_FILE_CLOSED,
  EET_ERROR_MMAP_FAILED,
  EET_ERROR_X509_ENCODING_FAILED,
  EET_ERROR_SIGNATURE_FAILED,
  EET_ERROR_INVALID_SIGNATURE,
  EET_ERROR_NOT_SIGNED,
  EET_ERROR_NOT_IMPLEMENTED,
  EET_ERROR_PRNG_NOT_SEEDED,
  EET_ERROR_ENCRYPT_FAILED,
  EET_ERROR_DECRYPT_FAILED
}
 All the error identifiers known by Eet. More...
 

Functions

EAPI int eet_init (void)
 Initializes the EET library. More...
 
EAPI int eet_shutdown (void)
 Shuts down the EET library. More...
 
EAPI void eet_clearcache (void)
 Clears eet cache. More...
 

Variables

EAPI Eet_Versioneet_version
 Eet Version Information.
 

Detailed Description

Functions that affect Eet as a whole.

Enumeration Type Documentation

◆ _Eet_Error

enum _Eet_Error

All the error identifiers known by Eet.

Enumerator
EET_ERROR_NONE 

No error, it's all fine!

EET_ERROR_BAD_OBJECT 

Given object or handle is NULL or invalid.

EET_ERROR_EMPTY 

There was nothing to do.

EET_ERROR_NOT_WRITABLE 

Could not write to file or file is EET_FILE_MODE_READ.

EET_ERROR_OUT_OF_MEMORY 

Could not allocate memory.

EET_ERROR_WRITE_ERROR 

Failed to write data to destination.

EET_ERROR_WRITE_ERROR_FILE_TOO_BIG 

Failed to write file since it is too big.

EET_ERROR_WRITE_ERROR_IO_ERROR 

Failed to write due a generic Input/Output error.

EET_ERROR_WRITE_ERROR_OUT_OF_SPACE 

Failed to write due out of space.

EET_ERROR_WRITE_ERROR_FILE_CLOSED 

Failed to write because file was closed.

EET_ERROR_MMAP_FAILED 

Could not mmap file.

EET_ERROR_X509_ENCODING_FAILED 

Could not encode using X509.

EET_ERROR_SIGNATURE_FAILED 

Could not validate signature.

EET_ERROR_INVALID_SIGNATURE 

Signature is invalid.

EET_ERROR_NOT_SIGNED 

File or contents are not signed.

EET_ERROR_NOT_IMPLEMENTED 

Function is not implemented.

EET_ERROR_PRNG_NOT_SEEDED 

Could not introduce random seed.

EET_ERROR_ENCRYPT_FAILED 

Could not encrypt contents.

EET_ERROR_DECRYPT_FAILED 

Could not decrypt contents.

Function Documentation

◆ eet_init()

EAPI int eet_init ( void  )

Initializes the EET library.

The first time this function is called, it will perform all the internal initialization required for the library to function properly and increment the initialization counter. Any subsequent call only increment this counter and return its new value, so it's safe to call this function more than once.

Returns
The new init count. Will be 0 if initialization failed.
Since
1.0.0
Examples
eet-basic.c, eet-data-cipher_decipher.c, eet-data-file_descriptor_01.c, eet-data-file_descriptor_02.c, eet-data-nested.c, eet-data-simple.c, and eet-file.c.

References eina_init(), eina_lock_new(), eina_log_domain_register(), eina_log_domain_unregister(), EINA_LOG_ERR, EINA_LOG_STATE_INIT, EINA_LOG_STATE_STOP, eina_log_timing(), eina_shutdown(), and emile_init().

Referenced by edje_init(), efreet_init(), elm_quicklaunch_init(), and evas_init().

◆ eet_shutdown()

EAPI int eet_shutdown ( void  )

Shuts down the EET library.

If eet_init() was called more than once for the running application, eet_shutdown() will decrement the initialization counter and return its new value, without doing anything else. When the counter reaches 0, all of the internal elements will be shutdown and any memory used freed.

Returns
The new init count.
Since
1.0.0
Examples
eet-basic.c, eet-data-cipher_decipher.c, eet-data-file_descriptor_01.c, eet-data-file_descriptor_02.c, eet-data-nested.c, eet-data-simple.c, and eet-file.c.

References alloca(), eet_clearcache(), eina_lock_free(), eina_log_domain_unregister(), EINA_LOG_STATE_SHUTDOWN, EINA_LOG_STATE_START, eina_log_timing(), eina_shutdown(), EINA_TRUE, emile_shutdown(), and ERR.

Referenced by efreet_init(), efreet_shutdown(), emotion_shutdown(), evas_init(), and evas_shutdown().

◆ eet_clearcache()

EAPI void eet_clearcache ( void  )

Clears eet cache.

For a faster access to previously accessed data, Eet keeps an internal cache of files. These files will be freed automatically only when they are unused and the cache gets full, in order based on the last time they were used. On systems with little memory this may present an unnecessary constraint, so eet_clearcache() is available for users to reclaim the memory used by files that are no longer needed. Those that were open using EET_FILE_MODE_WRITE or EET_FILE_MODE_READ_WRITE and have modifications, will be written down to disk before flushing them from memory.

Since
1.0.0

References alloca(), EINA_FALSE, and EINA_TRUE.

Referenced by eet_shutdown(), and elm_cache_all_flush().