~ubuntu-branches/ubuntu/wily/pan/wily

« back to all changes in this revision

Viewing changes to pan/data/article-cache.h

  • Committer: Package Import Robot
  • Author(s): Dominique Dumont
  • Date: 2012-05-04 10:16:19 UTC
  • mfrom: (1.1.8) (2.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20120504101619-olby8ip0u03ajwm8
Tags: 0.137-1
new upstream release (mostly bug fix)

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
  {
62
62
    public:
63
63
 
 
64
      enum CacheResponse_types
 
65
      {
 
66
        CACHE_IO_ERR,
 
67
        CACHE_DISK_FULL,
 
68
        CACHE_OK
 
69
      };
 
70
 
 
71
      struct CacheResponse
 
72
      {
 
73
        CacheResponse_types type;
 
74
        std::string err; // perhaps use gerror here??
 
75
      };
 
76
 
64
77
      ArticleCache (const StringView& path, const StringView& extension, size_t max_megs=10);
65
78
      ~ArticleCache ();
66
79
 
67
80
      typedef std::vector<Quark> mid_sequence_t;
68
81
 
69
82
      bool contains (const Quark& message_id) const;
70
 
      bool add (const Quark& message_id, const StringView& article);
 
83
      CacheResponse add (const Quark& message_id, const StringView& article);
71
84
      void reserve (const mid_sequence_t& mids);
72
85
      void release (const mid_sequence_t& mids);
73
86
      void resize ();