]> git.ipfire.org Git - thirdparty/squid.git/blob - src/tests/stub_MemObject.cc
Merge from trunk. Remove dead files and fluff changes
[thirdparty/squid.git] / src / tests / stub_MemObject.cc
1 /*
2 * $Id$
3 *
4 * DEBUG: section 84 Helper process maintenance
5 * AUTHOR: Robert Collins
6 *
7 * SQUID Web Proxy Cache http://www.squid-cache.org/
8 * ----------------------------------------------------------
9 *
10 * Squid is the result of efforts by numerous individuals from
11 * the Internet community; see the CONTRIBUTORS file for full
12 * details. Many organizations have provided support for Squid's
13 * development; see the SPONSORS file for full details. Squid is
14 * Copyrighted (C) 2001 by the Regents of the University of
15 * California; see the COPYRIGHT file for full details. Squid
16 * incorporates software developed and/or copyrighted by other
17 * sources; see the CREDITS file for full details.
18 *
19 * This program is free software; you can redistribute it and/or modify
20 * it under the terms of the GNU General Public License as published by
21 * the Free Software Foundation; either version 2 of the License, or
22 * (at your option) any later version.
23 *
24 * This program is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 * GNU General Public License for more details.
28 *
29 * You should have received a copy of the GNU General Public License
30 * along with this program; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
32 *
33 */
34
35 #include "squid.h"
36 #include "comm/Connection.h"
37 #include "MemObject.h"
38 #include "HttpReply.h"
39 #if USE_DELAY_POOLS
40 #include "DelayPools.h"
41 #endif
42
43 RemovalPolicy * mem_policy = NULL;
44
45 int64_t
46 MemObject::endOffset() const
47 {
48 return data_hdr.endOffset();
49 }
50
51 void
52 MemObject::trimSwappable()
53 {
54 fatal ("Not implemented");
55 }
56
57 void
58 MemObject::trimUnSwappable()
59 {
60 fatal ("Not implemented");
61 }
62
63 int64_t
64 MemObject::policyLowestOffsetToKeep(bool swap) const
65 {
66 fatal ("Not implemented");
67 return -1;
68 }
69
70 MemObject::MemObject (char const *, char const *)
71 {}
72
73 HttpReply const *
74 MemObject::getReply() const
75 {
76 return NULL;
77 }
78
79 void
80 MemObject::reset()
81 {
82 fatal ("Not implemented");
83 }
84
85 void
86 MemObject::delayRead(DeferredRead const &aRead)
87 {
88 fatal ("Not implemented");
89 }
90
91 bool
92 MemObject::readAheadPolicyCanRead() const
93 {
94 fatal ("Not implemented");
95 return false;
96 }
97
98 void
99 MemObject::setNoDelay(bool const newValue)
100 {
101 fatal ("Not implemented");
102 }
103
104 MemObject::~MemObject()
105 {
106 fatal ("Not implemented");
107 }
108
109 int
110 MemObject::mostBytesWanted(int max) const
111 {
112 fatal ("Not implemented");
113 return -1;
114 }
115
116 #if USE_DELAY_POOLS
117 DelayId
118 MemObject::mostBytesAllowed() const
119 {
120 DelayId result;
121 fatal ("Not implemented");
122 return result;
123 }
124 #endif
125
126 void
127 MemObject::unlinkRequest()
128 {
129 fatal ("Not implemented");
130 }
131
132 void
133 MemObject::write(StoreIOBuffer writeBuffer, STMCB *callback, void *callbackData)
134 {
135 PROF_start(MemObject_write);
136 debugs(19, 6, "memWrite: offset " << writeBuffer.offset << " len " << writeBuffer.length);
137
138 /* the offset is into the content, not the headers */
139 writeBuffer.offset += (_reply ? _reply->hdr_sz : 0);
140
141 /* We don't separate out mime headers yet, so ensure that the first
142 * write is at offset 0 - where they start
143 */
144 assert (data_hdr.endOffset() || writeBuffer.offset == 0);
145
146 assert (data_hdr.write (writeBuffer));
147 callback (callbackData, writeBuffer);
148 PROF_stop(MemObject_write);
149 }
150
151 void
152 MemObject::replaceHttpReply(HttpReply *newrep)
153 {
154 fatal ("Not implemented");
155 }
156
157 int64_t
158 MemObject::lowestMemReaderOffset() const
159 {
160 fatal ("Not implemented");
161 return 0;
162 }
163
164 void
165 MemObject::kickReads()
166 {
167 fatal ("Not implemented");
168 }
169
170 int64_t
171 MemObject::objectBytesOnDisk() const
172 {
173 fatal ("MemObject.cc required.");
174 return 0;
175 }
176
177 bool
178 MemObject::isContiguous() const
179 {
180 fatal ("MemObject.cc required.");
181 return false;
182 }