]>
git.ipfire.org Git - thirdparty/squid.git/blob - src/stmem.h
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
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.
26 int64_t lowestOffset () const;
27 int64_t endOffset () const;
28 int64_t freeDataUpto (int64_t);
29 ssize_t
copy (StoreIOBuffer
const &) const;
30 bool hasContigousContentRange(Range
<int64_t> const &range
) const;
32 bool write (StoreIOBuffer
const &);
35 /* Not an iterator - thus the start, not begin() */
36 mem_node
const *start() const;
37 mem_node
*getBlockContainingLocation (int64_t location
) const;
38 /* access the contained nodes - easier than punning
39 * as a contianer ourselves
41 const Splay
<mem_node
*> &getNodes() const;
42 char * NodeGet(mem_node
* aNode
);
44 /* Only for use of MemObject */
45 void internalAppend(const char *data
, int len
);
47 static Splay
<mem_node
*>::SPLAYCMP NodeCompare
;
50 void debugDump() const;
51 bool unlink(mem_node
*aNode
);
52 void makeAppendSpace();
53 int appendToNode(mem_node
*aNode
, const char *data
, int maxLength
);
54 void appendNode (mem_node
*aNode
);
55 size_t copyAvailable(mem_node
*aNode
, int64_t location
, size_t amount
, char *target
) const;
56 bool unionNotEmpty (StoreIOBuffer
const &);
57 mem_node
*nodeToRecieve(int64_t offset
);
58 size_t writeAvailable(mem_node
*aNode
, int64_t location
, size_t amount
, char const *source
);
60 Splay
<mem_node
*> nodes
;
63 #endif /* SQUID_STMEM_H */