~ubuntu-branches/ubuntu/oneiric/squid3/oneiric-security

« back to all changes in this revision

Viewing changes to src/ICAP/ICAPOptXact.h

  • Committer: Bazaar Package Importer
  • Author(s): Luigi Gangitano
  • Date: 2007-05-13 16:03:16 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070513160316-2h6kn6h1z0q1fvyo
Tags: 3.0.PRE6-1
* New upstream release
  - Removed patches integrated upsteam:
    + 04-m68k-ftbfs

* debian/rules
  - Enable delay pools (Closes: #410785)
  - Enable cache digests (Closes: #416631)
  - Enable ICAP client
  - Raised Max Filedescriptor limit to 65536

* debian/control
  - Added real package dependency for httpd in squid3-cgi

* debian/patches/02-makefile-defaults
  - Fix default configuration file for cachemgr.cgi (Closes: #416630)

* debian/squid3.postinst
  - Fixed bashish in postinst (Closes: #411797)

* debian/patches/05-helpers-typo
  - Added upstream patch fixing compilation error in src/helpers.cc

* debian/patches/06-mem-obj-reference
  - Added upstream patch fixing a mem_obj reference in src/store.cc

* debian/patches/07-close-icap-connections
  - Added upstream patch fixing icap connection starvation

* debian/squid3.rc
  - Added LSB-compliant description to rc script

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: ICAPOptXact.h,v 1.4 2006/10/31 23:30:58 wessels Exp $
 
2
 * $Id: ICAPOptXact.h,v 1.6 2007/05/08 16:32:11 rousskov Exp $
3
3
 *
4
4
 *
5
5
 * SQUID Web Proxy Cache          http://www.squid-cache.org/
34
34
#define SQUID_ICAPOPTXACT_H
35
35
 
36
36
#include "ICAPXaction.h"
 
37
#include "ICAPLauncher.h"
37
38
 
38
39
class ICAPOptions;
39
40
 
 
41
 
40
42
/* ICAPOptXact sends an ICAP OPTIONS request to the ICAP service,
41
 
 * converts the response into ICAPOptions object, and notifies
42
 
 * the caller via the callback. NULL options objects means the
43
 
 * ICAP service could not be contacted or did not return any response */
 
43
 * parses the ICAP response, and sends it to the initiator. A NULL response
 
44
 * means the ICAP service could not be contacted or did not return any
 
45
 * valid response. */
44
46
 
45
47
class ICAPOptXact: public ICAPXaction
46
48
{
47
49
 
48
50
public:
49
 
    typedef void Callback(ICAPOptXact*, void *data);
50
 
 
51
 
    ICAPOptXact();
52
 
    virtual ~ICAPOptXact();
53
 
 
54
 
    void start(ICAPServiceRep::Pointer &aService, Callback *aCb, void *aCbData);
55
 
 
56
 
    ICAPOptions *options; // result for the caller to take/handle
 
51
    ICAPOptXact(ICAPInitiator *anInitiator, ICAPServiceRep::Pointer &aService);
57
52
 
58
53
protected:
 
54
    virtual void start();
59
55
    virtual void handleCommConnected();
60
56
    virtual void handleCommWrote(size_t size);
61
57
    virtual void handleCommRead(size_t size);
62
 
    virtual bool doneAll() const;
63
58
 
64
59
    void makeRequest(MemBuf &buf);
65
 
    bool parseResponse();
 
60
    HttpMsg *parseResponse();
66
61
 
67
62
    void startReading();
68
63
 
69
 
    virtual void doStop();
70
 
 
71
64
private:
72
 
    Callback *cb;
73
 
    void *cbData;
74
 
 
75
65
    CBDATA_CLASS2(ICAPOptXact);
76
66
};
77
67
 
 
68
// An ICAPLauncher that stores ICAPOptXact construction info and 
 
69
// creates ICAPOptXact when needed
 
70
class ICAPOptXactLauncher: public ICAPLauncher
 
71
{
 
72
public:
 
73
    ICAPOptXactLauncher(ICAPInitiator *anInitiator, ICAPServiceRep::Pointer &aService);
 
74
 
 
75
protected:
 
76
    virtual ICAPXaction *createXaction();
 
77
 
 
78
private:
 
79
    CBDATA_CLASS2(ICAPOptXactLauncher);
 
80
};
 
81
 
78
82
#endif /* SQUID_ICAPOPTXACT_H */