Revision: 2670
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2670&view=rev
Author:   rorthomas
Date:     2012-05-26 00:13:05 +0000 (Sat, 26 May 2012)
Log Message:
-----------
and new "generateHashFromFile" function

Modified Paths:
--------------
    trunk/source/main/utils/utils.cpp
    trunk/source/main/utils/utils.h

Modified: trunk/source/main/utils/utils.cpp
===================================================================
--- trunk/source/main/utils/utils.cpp   2012-05-26 00:09:28 UTC (rev 2669)
+++ trunk/source/main/utils/utils.cpp   2012-05-26 00:13:05 UTC (rev 2670)
@@ -397,3 +397,10 @@
        
        return String(hash_result);
 }
+
+Ogre::String generateHashFromFile(Ogre::String filename)
+{
+       // no exception handling in here
+       DataStreamPtr ds = 
ResourceGroupManager::getSingleton().openResource(filename, 
ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
+       return generateHashFromDataStream(ds);
+}
\ No newline at end of file

Modified: trunk/source/main/utils/utils.h
===================================================================
--- trunk/source/main/utils/utils.h     2012-05-26 00:09:28 UTC (rev 2669)
+++ trunk/source/main/utils/utils.h     2012-05-26 00:13:05 UTC (rev 2670)
@@ -138,4 +138,5 @@
 
 // generates a hash from a Datastream, beware, its loading the whole thing 
into a bufer, so its not suited for big files
 Ogre::String generateHashFromDataStream(Ogre::DataStreamPtr &ds);
+Ogre::String generateHashFromFile(Ogre::String filename);
 #endif //UTILS_H_

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to