4141class HttpSM ;
4242class HttpCacheSM ;
4343
44- struct HttpCacheAction : public Action {
45- HttpCacheAction ();
44+ class HttpCacheAction : public Action
45+ {
46+ public:
4647 void cancel (Continuation *c = nullptr ) override ;
48+
4749 void
48- init (HttpCacheSM *sm_arg )
50+ init (HttpCacheSM *cache_sm )
4951 {
50- sm = sm_arg ;
52+ _cache_sm = cache_sm ;
5153 };
54+
5255 void
5356 reset ()
5457 {
5558 cancelled = false ;
5659 }
5760
58- HttpCacheSM *sm = nullptr ;
61+ private:
62+ HttpCacheSM *_cache_sm = nullptr ;
5963};
6064
6165class HttpCacheSM : public Continuation
6266{
6367public:
64- HttpCacheSM ();
68+ HttpCacheSM () : Continuation( nullptr ), captive_action() {}
6569
6670 void
6771 init (HttpSM *sm_arg, Ptr<ProxyMutex> &amutex)
@@ -88,14 +92,14 @@ class HttpCacheSM : public Continuation
8892 Action *pending_action = nullptr ;
8993
9094 // Function to set readwhilewrite_inprogress flag
91- inline void
95+ void
9296 set_readwhilewrite_inprogress (bool value)
9397 {
9498 readwhilewrite_inprogress = value;
9599 }
96100
97101 // Function to get the readwhilewrite_inprogress flag
98- inline bool
102+ bool
99103 is_readwhilewrite_inprogress ()
100104 {
101105 return readwhilewrite_inprogress;
@@ -113,7 +117,7 @@ class HttpCacheSM : public Continuation
113117 return cache_read_vc ? (cache_read_vc->is_compressed_in_ram ()) : false ;
114118 }
115119
116- inline void
120+ void
117121 set_open_read_tries (int value)
118122 {
119123 open_read_tries = value;
@@ -125,7 +129,7 @@ class HttpCacheSM : public Continuation
125129 return open_read_tries;
126130 }
127131
128- inline void
132+ void
129133 set_open_write_tries (int value)
130134 {
131135 open_write_tries = value;
@@ -161,7 +165,7 @@ class HttpCacheSM : public Continuation
161165 return nullptr ;
162166 }
163167
164- inline void
168+ void
165169 abort_read ()
166170 {
167171 if (cache_read_vc) {
@@ -170,7 +174,8 @@ class HttpCacheSM : public Continuation
170174 cache_read_vc = nullptr ;
171175 }
172176 }
173- inline void
177+
178+ void
174179 abort_write ()
175180 {
176181 if (cache_write_vc) {
@@ -179,7 +184,8 @@ class HttpCacheSM : public Continuation
179184 cache_write_vc = nullptr ;
180185 }
181186 }
182- inline void
187+
188+ void
183189 close_write ()
184190 {
185191 if (cache_write_vc) {
@@ -188,7 +194,8 @@ class HttpCacheSM : public Continuation
188194 cache_write_vc = nullptr ;
189195 }
190196 }
191- inline void
197+
198+ void
192199 close_read ()
193200 {
194201 if (cache_read_vc) {
@@ -197,7 +204,8 @@ class HttpCacheSM : public Continuation
197204 cache_read_vc = nullptr ;
198205 }
199206 }
200- inline void
207+
208+ void
201209 end_both ()
202210 {
203211 // We close the read so that cache
@@ -206,7 +214,7 @@ class HttpCacheSM : public Continuation
206214 abort_write ();
207215 }
208216
209- inline int
217+ int
210218 get_last_error () const
211219 {
212220 return err_code;
0 commit comments