Пример #1
0
void EflResources::unloadImage( std::string const& _path )
{
    if( 0 != preloaded_images__.count( _path ) )
    {
        evas_object_del( preloaded_images__[_path] );
        preloaded_images__.erase( _path );
        std::string cached_file( cache_dir + _path );
        if( 1 == ecore_file_exists( cached_file.c_str() ) ) // EINA_TRUE
            ecore_file_remove( cached_file.c_str() );
    }
}
Пример #2
0
static void storage_rewrite_all_items(StorageData *sd)
{
	CALLED();
	if (sd->ef)
		eet_close(sd->ef);
	ecore_file_remove(STORAGE_FILEPATH);
	sd->ef = eet_open(STORAGE_FILEPATH, EET_FILE_MODE_READ_WRITE);

	int i;
	for (i = 0; i < STORAGE_ITEM_CNT; i++)
	{
		if ((sd->indexTable[i] != STORAGE_INDEX_ITEM_NONE) && (sd->itemTable[i]))
			item_write(sd->ef, i, sd->itemTable[i]);
	}
	storage_index_write(sd);
}
gboolean _bt_obex_writeclose(bt_obex_server_transfer_info_t *transfer_complete_info)
{
	retv_if(transfer_complete_info->filename == NULL, FALSE);

	char file_path[BT_TEMP_FILE_PATH_LEN_MAX] = { 0, };
	bt_file_type_t file_type = 0;
	char *extn = NULL;
	char storage[STORAGE_PATH_LEN_MAX] ={0, };

	DBG("File name[%s], File name length = [%d]\n",
			 transfer_complete_info->filename,
			 strlen(transfer_complete_info->filename));

	extn = strrchr(transfer_complete_info->filename, '.');
	if (NULL != extn)
		extn++;
	DBG("====== : %s\n", extn);
	file_type = __get_file_type(extn);
	DBG("file type : %d\n", file_type);
	switch (file_type) {
	case BT_FILE_VCARD:
	case BT_FILE_VCAL:
	case BT_FILE_VBOOKMARK:
		_bt_get_default_storage(storage);
		snprintf(file_path, sizeof(file_path), "%s/%s", storage,
			    transfer_complete_info->filename);
		DBG("BT_OPP_FILE_VOBJECT : file_path = %s\n", file_path);
		if (__bt_save_v_object(file_path, file_type)) {
			ecore_file_remove(file_path);
		}
		break;
	default:
		break;
	}
	return FALSE;
}