StoreMeta.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 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 
92 
97 
103 
105 
106  STORE_META_STOREURL, /* the store url, if different to the normal URL */
107  STORE_META_VARY_ID, /* Unique ID linking variants */
109 };
110 
113 {
114 protected:
115  StoreMeta() : length(-1), value(nullptr), next(nullptr) { }
116  StoreMeta(const StoreMeta &);
117  StoreMeta& operator=(const StoreMeta &);
118 
119 public:
120  static bool validType(char);
121  static int const MaximumTLVLength;
122  static int const MinimumTLVLength;
123  static StoreMeta *Factory(char type, size_t len, void const *value);
124  static StoreMeta **Add(StoreMeta **tail, StoreMeta *aNode);
125  static void FreeList(StoreMeta **head);
126 
127  virtual char getType() const = 0;
128  virtual bool validLength(int) const;
129  virtual bool checkConsistency(StoreEntry *) const;
130  virtual ~StoreMeta() {}
131 
132  int length;
133  void *value;
135 };
136 
138 char *storeSwapMetaPack(tlv * tlv_list, int *length);
142 void storeSwapTLVFree(tlv * n);
143 
144 #endif /* SQUID_TYPELENGTHVALUE_H */
145 
tlv * next
Definition: StoreMeta.h:134
static StoreMeta ** Add(StoreMeta **tail, StoreMeta *aNode)
Definition: StoreMeta.cc:130
static void FreeList(StoreMeta **head)
Definition: StoreMeta.cc:118
char * storeSwapMetaPack(tlv *tlv_list, int *length)
int type
Definition: errorpage.cc:79
static StoreMeta * Factory(char type, size_t len, void const *value)
Definition: StoreMeta.cc:68
void * value
Definition: StoreMeta.h:133
void storeSwapTLVFree(tlv *n)
class StoreMeta tlv
Definition: StoreMeta.h:15
virtual bool validLength(int) const
Definition: StoreMeta.cc:56
int length
Definition: StoreMeta.h:132
int unsigned int const char *desc STUB void int len
Definition: stub_fd.cc:20
static int const MaximumTLVLength
Definition: StoreMeta.h:121
StoreMeta & operator=(const StoreMeta &)
Definition: StoreMeta.cc:173
virtual bool checkConsistency(StoreEntry *) const
Definition: StoreMeta.cc:138
virtual char getType() const =0
static bool validType(char)
Definition: StoreMeta.cc:24
virtual ~StoreMeta()
Definition: StoreMeta.h:130
static int const MinimumTLVLength
Definition: StoreMeta.h:122
tlv * storeSwapMetaBuild(StoreEntry *e)
squidaio_request_t * head
Definition: aiops.cc:127

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors