pan-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-devel] newsrc with DB


From: K. Haley
Subject: [Pan-devel] newsrc with DB
Date: Sun, 06 Jun 2004 18:41:46 -0600
User-agent: Mozilla Thunderbird 0.6 (Windows/20040502)

I just realized what Charles ment about supporting newsrc files with the DB back-end. Since newsrc files track UIDs for physical servers, loading new headers becomes a bit more complicated. Things would have to go something like this:

at startup:
load list of servers from DB
foreach server
 foreach group in newsrc file
   if group not in Group
     add to Group
   get Group:id
   update subscibe status in main group list
   get G_S:id
   foreach UID
     if G_S:id and UID in G_S_A
       if Article:id !=NULL    update Article read status
     else
     add to G_S_A with Article:id = NULL

to load new headers:
remove NEW status from exising articles in this group
foreach new header on server
 if msg-id not in Article
   add to Article
 get Article:id
 if G_S:id and UID in G_S_A
   if Article:id == NULL in G_S_A
     update Article:id in G_S_A
     mark Article read
 else add to G_S_A

Hopefully that pseudo-code is not to difficult to understand. I also realize that there are ways to speed it up but that doesn't matter at this point.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]