[Jahshaka-cvs] openlibraries/test/openassetlib/unittest_sqlite3_metadata_plugin main.cpp, 1.9, 1.1
Status: Beta
Brought to you by:
jahshaka
From: Julian N. <non...@us...> - 2006-07-28 21:18:22
|
Update of /cvsroot/openlibraries/openlibraries/test/openassetlib/unittest_sqlite3_metadata_plugin In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv25716/test/openassetlib/unittest_sqlite3_metadata_plugin Modified Files: main.cpp Log Message: Modified test. Index: main.cpp =================================================================== RCS file: /cvsroot/openlibraries/openlibraries/test/openassetlib/unittest_sqlite3_metadata_plugin/main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- main.cpp 28 Jul 2006 11:00:33 -0000 1.9 +++ main.cpp 28 Jul 2006 15:25:49 -0000 1.10 @@ -154,7 +154,10 @@ } } - /* + save_set(pPlugin, "./jahreel1.xml", restored_set); + + + unsigned char buffer[256]; for(int idx = 0; idx < 256; idx++) { @@ -173,16 +176,25 @@ } free(serialized_binary_object); free(deserialized_binary_object); - */ + + oal::al::asset_ptr thumbnail_asset = oal::al::asset::create(); thumbnail_asset->set(KEY_STRING_FILENAME, std::string("jahlogo.png")); thumbnail_asset->set(KEY_STRING_LOCATION, std::string("C:\\Media\\images")); oil::il::image_type_ptr thumbnail_image = oal::al::convert_to_image(thumbnail_asset); - if(!oal::al::store_image(pPlugin, asset, thumbnail_image, "thumbnail")) + memset((void*)thumbnail_image->data(0, false), NULL, thumbnail_image->size()); + memcpy((void*)thumbnail_image->data(0, false), (const void*)buffer, 256); + if(!oal::al::store_image(asset, thumbnail_image, "thumbnail")) _asm int 3; - - oil::il::image_type_ptr restored_thumbnail_image = oal::al::restore_image(pPlugin, asset, "thumbnail"); + failed_to_store_set = oal::al::store(pPlugin, store_set); + if(failed_to_store_set != oal::al::set_ptr()) + _asm int 3; + restored_set = oal::al::restore(pPlugin, set_to_restore); + if(restored_set == oal::al::set_ptr()) + _asm int 3; + //oil::il::image_type_ptr restored_thumbnail_image = oal::al::restore_image(asset, "thumbnail"); + oil::il::image_type_ptr restored_thumbnail_image = oal::al::restore_image(restored_set->at(0), "thumbnail"); if(restored_thumbnail_image == oil::il::image_type_ptr()) _asm int 3; else |