browserutilities/feedsengine/FeedsServer/Server/src/FeedsServerSession.cpp
changeset 13 10e98eab6f85
parent 0 dd21522fd290
child 16 a359256acfc6
equal deleted inserted replaced
8:7c90e6132015 13:10e98eab6f85
   617     {
   617     {
   618     TFeedsServerResponseType         type = EFeedsServerPayloadDone;
   618     TFeedsServerResponseType         type = EFeedsServerPayloadDone;
   619     TPckg<TFeedsServerResponseType>  typePkg(type);
   619     TPckg<TFeedsServerResponseType>  typePkg(type);
   620     TInt    folderListId = KNoFolderListId;
   620     TInt    folderListId = KNoFolderListId;
   621     const TInt KAutoUpdatingOff = 0;
   621     const TInt KAutoUpdatingOff = 0;
   622 	iCurrentRequest = 1;
   622     const TInt KRootFolderId = 0;
       
   623 
       
   624     iCurrentRequest = 1;
   623     // Note: The a packed feed is made up of two buffers, a buffer of tokens
   625     // Note: The a packed feed is made up of two buffers, a buffer of tokens
   624     //       and a string table buffer.  The tokens define the structure of the 
   626     //       and a string table buffer.  The tokens define the structure of the 
   625     //       feed where the string table contains the feed's data. This
   627     //       feed where the string table contains the feed's data. This
   626     //       method sends the two buffers serially.  To fetch the entire packed
   628     //       method sends the two buffers serially.  To fetch the entire packed
   627     //       feed the client makes multiple requests.
   629     //       feed the client makes multiple requests.
   677             // Get the corresponding feed id. If it isn't found then force
   679             // Get the corresponding feed id. If it isn't found then force
   678             // an update.
   680             // an update.
   679             //Gyanendra TODO // should create entry into database
   681             //Gyanendra TODO // should create entry into database
   680             if (!iFeedsServer.iFeedsDatabase->FeedIdFromUrlL(feedUrl, folderListId, feedId))
   682             if (!iFeedsServer.iFeedsDatabase->FeedIdFromUrlL(feedUrl, folderListId, feedId))
   681                 {
   683                 {
   682                 feedId = iFeedsServer.iFeedsDatabase->CommitFeedL(folderListId,KNullDesC,feedUrl, KAutoUpdatingOff);
   684                 //Find feed id from folder id
       
   685                 iFeedsServer.iFeedsDatabase->SetIsFolderTableUpdateNeeded(ETrue);
       
   686                 TInt entryId = iFeedsServer.iFeedsDatabase->FolderItemAddL(folderListId, feedUrl, feedUrl, EFalse, KRootFolderId, KAutoUpdatingOff);
       
   687                 iFeedsServer.iFeedsDatabase->FeedIdFromEntryId(entryId, folderListId, feedId);
   683                 updateNeeded = ETrue;
   688                 updateNeeded = ETrue;
   684                 }
   689                 }
   685             }
   690             }
   686         else
   691         else
   687             {
   692             {