/* * CCICredentialsIterator.h * * $Header: /cvs/kfm/KerberosFramework/CredentialsCache/Sources/Headers/CredentialsIterator.h,v 1.18 2004/10/22 20:48:28 lxs Exp $ */ #pragma once #include #include "Magic.h" #include "Internal.h" #include "Internalize.h" class CCECredentialsIterator { public: static cc_int32 Release ( cc_credentials_iterator_t inCCache); static cc_int32 Next ( cc_credentials_iterator_t inIterator, cc_credentials_t* outCredentials); private: // Disallowed CCECredentialsIterator (); CCECredentialsIterator (const CCECredentialsIterator&); CCECredentialsIterator& operator = (const CCECredentialsIterator&); }; class CCICCache; class CCICredentialsIterator: public CCIMagic , public CCIInternal { public: CCICredentialsIterator ( const CCICCache& inCCache, CCIInt32 inAPIVersion); ~CCICredentialsIterator (); bool HasMore () const; CCIUniqueID Next (); #if CCache_v2_compat // Neeeded by v2 compat iterator implementation CCIUInt32 CompatGetVersion () { return mVersion; } #endif enum { class_ID = FOUR_CHAR_CODE ('CrIt'), invalidObject = ccErrInvalidCredentialsIterator }; CCIInt32 GetAPIVersion () const { return mAPIVersion; } private: std::vector mIterationSet; std::vector ::iterator mIterator; std::auto_ptr mCCache; CCILockID mCCacheLock; #if CCache_v2_compat CCIUInt32 mVersion; #endif CCIInt32 mAPIVersion; void Validate (); static const cc_credentials_iterator_f sFunctionTable; friend class StInternalize ; friend class CCIInternal ; // Disallowed CCICredentialsIterator (const CCICredentialsIterator&); CCICredentialsIterator& operator = (const CCICredentialsIterator&); }; typedef StInternalize StCredentialsIterator;