]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/PeerDigest.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / PeerDigest.h
index 34b8d67ce4450ea452f5a562270afb0e0b104d63..fc71fc130ba3f54a1af229cd3027992f1bc18c16 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
  *
  * Squid software is distributed under GPLv2+ license and includes
  * contributions from numerous individuals and organizations.
@@ -12,7 +12,6 @@
 #if USE_CACHE_DIGESTS
 
 #include "cbdata.h"
-/* for CacheDigestGuessStats */
 #include "StatCounters.h"
 
 class Version
@@ -44,7 +43,12 @@ class store_client;
 
 class DigestFetchState
 {
+    CBDATA_CLASS(DigestFetchState);
+
 public:
+    DigestFetchState(PeerDigest *,HttpRequest *);
+    ~DigestFetchState();
+
     PeerDigest *pd;
     StoreEntry *entry;
     StoreEntry *old_entry;
@@ -52,7 +56,7 @@ public:
     store_client *old_sc;
     HttpRequest *request;
     int offset;
-    int mask_offset;
+    uint32_t mask_offset;
     time_t start_time;
     time_t resp_time;
     time_t expires;
@@ -60,9 +64,8 @@ public:
     struct {
         int msg;
         int bytes;
-    }
+    } sent, recv;
 
-    sent, recv;
     char buf[SM_PAGE_SIZE];
     ssize_t bufofs;
     digest_read_state_t state;
@@ -102,7 +105,7 @@ public:
 
         struct {
             int msgs;
-            kb_t kbytes;
+            ByteCounter kbytes;
         } sent, recv;
     } stats;
 };