StoreMeta.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #ifndef SQUID_TYPELENGTHVALUE_H
10 #define SQUID_TYPELENGTHVALUE_H
11 
12 class StoreEntry;
13 
14 // WTF?
15 typedef class StoreMeta tlv;
16 
34 enum {
39 
47 
55 
63 
69 
84 
89 
90  // TODO: document this TLV type code
92 
97 
103 
104  // TODO: document this TLV type code
106 
110 };
111 
114 {
115 protected:
116  StoreMeta() : length(-1), value(nullptr), next(nullptr) { }
117  StoreMeta(const StoreMeta &);
118  StoreMeta& operator=(const StoreMeta &);
119 
120 public:
121  static bool validType(char);
122  static int const MaximumTLVLength;
123  static int const MinimumTLVLength;
124  static StoreMeta *Factory(char type, size_t len, void const *value);
125  static StoreMeta **Add(StoreMeta **tail, StoreMeta *aNode);
126  static void FreeList(StoreMeta **head);
127 
128  virtual char getType() const = 0;
129  virtual bool validLength(int) const;
130  virtual bool checkConsistency(StoreEntry *) const;
131  virtual ~StoreMeta() {}
132 
133  int length;
134  void *value;
136 };
137 
139 char *storeSwapMetaPack(tlv * tlv_list, int *length);
143 void storeSwapTLVFree(tlv * n);
144 
145 #endif /* SQUID_TYPELENGTHVALUE_H */
146 
static bool validType(char)
Definition: StoreMeta.cc:24
@ STORE_META_OBJSIZE
Definition: StoreMeta.h:105
virtual bool checkConsistency(StoreEntry *) const
Definition: StoreMeta.cc:138
@ STORE_META_STD
Definition: StoreMeta.h:83
static StoreMeta ** Add(StoreMeta **tail, StoreMeta *aNode)
Definition: StoreMeta.cc:130
@ STORE_META_KEY_URL
Definition: StoreMeta.h:46
static const int MaximumTLVLength
Definition: StoreMeta.h:122
@ STORE_META_STD_LFS
Definition: StoreMeta.h:102
int type
Definition: errorpage.cc:152
virtual ~StoreMeta()
Definition: StoreMeta.h:131
@ STORE_META_HITMETERING
Definition: StoreMeta.h:88
@ STORE_META_KEY_SHA
Definition: StoreMeta.h:54
static const int MinimumTLVLength
Definition: StoreMeta.h:123
void storeSwapTLVFree(tlv *n)
StoreMeta & operator=(const StoreMeta &)
Definition: StoreMeta.cc:173
static void FreeList(StoreMeta **head)
Definition: StoreMeta.cc:118
static StoreMeta * Factory(char type, size_t len, void const *value)
Definition: StoreMeta.cc:68
virtual bool validLength(int) const
Definition: StoreMeta.cc:56
tlv * storeSwapMetaBuild(const StoreEntry *)
int length
Definition: StoreMeta.h:133
@ STORE_META_VARY_ID
Definition: StoreMeta.h:108
char * storeSwapMetaPack(tlv *tlv_list, int *length)
@ STORE_META_KEY_MD5
Definition: StoreMeta.h:62
@ STORE_META_VALID
Definition: StoreMeta.h:91
tlv * next
Definition: StoreMeta.h:135
void * value
Definition: StoreMeta.h:134
virtual char getType() const =0
squidaio_request_t * head
Definition: aiops.cc:127
class StoreMeta tlv
Definition: StoreMeta.h:15
int unsigned int const char *desc STUB void int len
Definition: stub_fd.cc:20
@ STORE_META_URL
Definition: StoreMeta.h:68
@ STORE_META_STOREURL
Definition: StoreMeta.h:107
@ STORE_META_VOID
Definition: StoreMeta.h:38
@ STORE_META_VARY_HEADERS
Definition: StoreMeta.h:96
@ STORE_META_END
Definition: StoreMeta.h:109

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors