#ifndef MYCFAVOURITES_H
#define MYCFAVOURITES_H
#include "FavouritesDb.h"
#include "FavouritesItem.h"
class CMyCFavourites : public CFavouritesDb
{
public:
static CMyCFavourites * NewL();
public:
virtual TUid PinbLinkUid() const;
virtual TPinbDocumentIconId PinbLinkIcon() const;
~CMyCFavourites(void);
};
#endif
#include "MyCFavourites.h"
_LIT(KBookmarkDBPath,"C:\\System\\data\\");
_LIT(KBookmarkDBFile,"Bookmarks1.db");
CMyCFavourites* CMyCFavourites::NewL()
{
CMyCFavourites * self = new( ELeave )CMyCFavourites( );
CleanupStack::PushL( self );
self->ConstructL( KBookmarkDBPath, KBookmarkDBFile );
CleanupStack::Pop( self );
return self;
}
TUid CMyCFavourites::PinbLinkUid() const
{
TUid tuid;
return tuid;
}
TPinbDocumentIconId CMyCFavourites::PinbLinkIcon() const
{
return EPinbUnknown;
}
CMyCFavourites::~CMyCFavourites(void)
{
}
CMyCFavourites *favoris=CMyCFavourites::NewL();
CleanupStack::PushL(favoris);
favoris->OpenL();
CFavouritesItem* favorisItem = CFavouritesItem::NewLC();
favoris->GetL(7,*favorisItem);
//CFavouritesItemList*test=new (ELeave) CFavouritesItemList();
//test->ItemByUid(1)->Name();
iEikonEnv->InfoMsg(favorisItem->Url());
favoris->Close();
CleanupStack::PopAndDestroy();
CleanupStack::PopAndDestroy();
其他请具体参见API REFERENCE GUIDE-》Browser Utilities#define MYCFAVOURITES_H
#include "FavouritesDb.h"
#include "FavouritesItem.h"
class CMyCFavourites : public CFavouritesDb
{
public:
static CMyCFavourites * NewL();
public:
virtual TUid PinbLinkUid() const;
virtual TPinbDocumentIconId PinbLinkIcon() const;
~CMyCFavourites(void);
};
#endif
#include "MyCFavourites.h"
_LIT(KBookmarkDBPath,"C:\\System\\data\\");
_LIT(KBookmarkDBFile,"Bookmarks1.db");
CMyCFavourites* CMyCFavourites::NewL()
{
CMyCFavourites * self = new( ELeave )CMyCFavourites( );
CleanupStack::PushL( self );
self->ConstructL( KBookmarkDBPath, KBookmarkDBFile );
CleanupStack::Pop( self );
return self;
}
TUid CMyCFavourites::PinbLinkUid() const
{
TUid tuid;
return tuid;
}
TPinbDocumentIconId CMyCFavourites::PinbLinkIcon() const
{
return EPinbUnknown;
}
CMyCFavourites::~CMyCFavourites(void)
{
}
CMyCFavourites *favoris=CMyCFavourites::NewL();
CleanupStack::PushL(favoris);
favoris->OpenL();
CFavouritesItem* favorisItem = CFavouritesItem::NewLC();
favoris->GetL(7,*favorisItem);
//CFavouritesItemList*test=new (ELeave) CFavouritesItemList();
//test->ItemByUid(1)->Name();
iEikonEnv->InfoMsg(favorisItem->Url());
favoris->Close();
CleanupStack::PopAndDestroy();
CleanupStack::PopAndDestroy();
嘿嘿请善用这些代码。。。。如用以上代码对你有用,摆脱帮个忙回复一下。。否则,生儿子没屁眼~~~哈哈