| 28 | #include "ts/apidefs.h" |
| 29 | |
| 30 | class TSSslHookInternalID |
| 31 | { |
| 32 | public: |
| 33 | explicit constexpr TSSslHookInternalID(TSHttpHookID id) : _id(id - TS_SSL_FIRST_HOOK) {} |
| 34 | |
| 35 | constexpr |
| 36 | operator int() const |
| 37 | { |
| 38 | return _id; |
| 39 | } |
| 40 | |
| 41 | static const int NUM = TS_SSL_LAST_HOOK - TS_SSL_FIRST_HOOK + 1; |
| 42 | |
| 43 | constexpr bool |
| 44 | is_in_bounds() const |
| 45 | { |
| 46 | return (_id >= 0) && (_id < NUM); |
| 47 | } |
| 48 | |
| 49 | private: |
| 50 | const int _id; |
| 51 | }; |
| 52 | |
| 53 | class SSLAPIHooks : public FeatureAPIHooks<TSSslHookInternalID, TSSslHookInternalID::NUM> |
| 54 | { |
no outgoing calls
no test coverage detected