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

« back to all changes in this revision

Viewing changes to src/adaptation/Initiator.h

  • Committer: Bazaar Package Importer
  • Author(s): Mahyuddin Susanto
  • Date: 2011-02-15 18:46:13 UTC
  • mfrom: (21.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110215184613-1u3dh5sz4i055flk
Tags: 3.1.10-1ubuntu1
* Merge from debian unstable. (LP: #719283)  Remaining changes:
  - debian/patches/18-fix-ftbfs-binutils-gold.dpatch: Add library linker into
    LIBS instead to LDFLAGS to fixing FTBFS binutils-gold.
* Drop Ubuntu configuration for ufw which landed in Debian and sync it: 
  - debian/squid3.ufw.profile.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#define SQUID_ADAPTATION__INITIATOR_H
3
3
 
4
4
#include "base/AsyncJob.h"
 
5
#include "base/CbcPointer.h"
5
6
#include "adaptation/forward.h"
6
7
 
7
8
/*
32
33
    virtual void noteAdaptationQueryAbort(bool final) = 0;
33
34
 
34
35
protected:
35
 
    Initiate *initiateAdaptation(Initiate *x); // locks and returns x
36
 
 
37
 
    // done with x (and not calling announceInitiatorAbort)
38
 
    void clearAdaptation(Initiate *&x); // unlocks x
39
 
 
40
 
    // inform the transaction about abnormal termination and clear it
41
 
    void announceInitiatorAbort(Initiate *&x); // unlocks x
 
36
    ///< starts freshly created initiate and returns a safe pointer to it
 
37
    CbcPointer<Initiate> initiateAdaptation(Initiate *x);
 
38
 
 
39
    /// clears the pointer (does not call announceInitiatorAbort)
 
40
    void clearAdaptation(CbcPointer<Initiate> &x);
 
41
 
 
42
    /// inform the transaction about abnormal termination and clear the pointer
 
43
    void announceInitiatorAbort(CbcPointer<Initiate> &x);
 
44
 
 
45
    /// Must(initiated(initiate)) instead of Must(initiate.set()), for clarity
 
46
    bool initiated(const CbcPointer<AsyncJob> &job) const { return job.set(); }
42
47
};
43
48
 
44
49
} // namespace Adaptation