[webkit-help] Save Favorite Icon

Stephan Assmus superstippi at gmx.de
Mon May 10 10:40:56 PDT 2010


Hi,

On 2010-05-10 at 14:29:31 [+0200], matilal.abhiroop at wipro.com wrote:
> How can I save the favorite icon to a particular location on the file
> system ?
> 
> Where can I find the implementation for saving the favorite icon ?

WebCore contains code for storing favicons in an SQLite database. Whether 
this code is enabled depends on the port. For example it is not enabled in 
the Apple port, but it is in the Qt port. The following code would enable 
persistent storage of the favicons:

#include "IconDatabase.h"

const char* pathToDatabaseFile = ...;

WebCore::iconDatabase()->setEnabled(true);
WebCore::iconDatabase()->open(pathToDatabaseFile);

Which port are you working with? You would then use the respective API of 
that port, and not the WebCore API directly.

Best regards,
-Stephan


More information about the webkit-help mailing list