Scheme.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2017 The Squid Software Foundation and contributors
3  *
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.
7  */
8 
9 #ifndef SQUID_AUTH_SCHEME_H
10 #define SQUID_AUTH_SCHEME_H
11 
12 #if USE_AUTH
13 
14 #include "auth/forward.h"
15 #include "base/RefCount.h"
16 
17 namespace Auth
18 {
19 
27 class Scheme : public RefCountable
28 {
29 public:
31  typedef std::vector<Scheme::Pointer>::iterator iterator;
32  typedef std::vector<Scheme::Pointer>::const_iterator const_iterator;
33 
34 public:
36  virtual ~Scheme() {};
37 
38  static void AddScheme(Scheme::Pointer);
39 
48  static void FreeAll();
49 
53  static Scheme::Pointer Find(const char *);
54 
55  /* per scheme methods */
56  virtual char const *type() const = 0;
57  virtual void shutdownCleanup() = 0;
58  virtual Auth::SchemeConfig *createConfig() = 0;
59 
60  // Not implemented
61  Scheme(Scheme const &);
62  Scheme &operator=(Scheme const&);
63 
64  static std::vector<Scheme::Pointer> &GetSchemes();
65 
66 protected:
68 
69 private:
70  static std::vector<Scheme::Pointer> *_Schemes;
71 };
72 
73 } // namespace Auth
74 
75 #endif /* USE_AUTH */
76 #endif /* SQUID_AUTH_SCHEME_H */
77 
bool initialised
Definition: Scheme.h:67
std::vector< Scheme::Pointer >::iterator iterator
Definition: Scheme.h:31
static std::vector< Scheme::Pointer > & GetSchemes()
Definition: Scheme.cc:44
virtual void shutdownCleanup()=0
virtual ~Scheme()
Definition: Scheme.h:36
std::vector< Scheme::Pointer >::const_iterator const_iterator
Definition: Scheme.h:32
static void FreeAll()
Definition: Scheme.cc:60
static Scheme::Pointer Find(const char *)
Definition: Scheme.cc:33
Scheme & operator=(Scheme const &)
virtual Auth::SchemeConfig * createConfig()=0
static void AddScheme(Scheme::Pointer)
Definition: Scheme.cc:20
static std::vector< Scheme::Pointer > * _Schemes
Definition: Scheme.h:70
RefCount< Scheme > Pointer
Definition: Scheme.h:30
virtual char const * type() const =0
#define false
Definition: GnuRegex.c:233

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors