C/C++ Reference
DavAuth.h
00001 /*
00002  *     ____             _________                __                _     
00003  *    / __ \___  ____ _/ /_  __(_)___ ___  ___  / /   ____  ____ _(_)____
00004  *   / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ /   / __ \/ __ `/ / ___/
00005  *  / _, _/  __/ /_/ / / / / / / / / / / /  __/ /___/ /_/ / /_/ / / /__  
00006  * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/  
00007  *                                                       /____/          
00008  *
00009  *                  Barracuda Embedded Web-Server 
00010  ****************************************************************************
00011  *            HEADER
00012  *
00013  *   $Id: DavAuth.h 2648 2012-04-26 20:27:21Z wini $
00014  *
00015  *   COPYRIGHT:  Real Time Logic, 2006
00016  *
00017  *   This software is copyrighted by and is the sole property of Real
00018  *   Time Logic LLC.  All rights, title, ownership, or other interests in
00019  *   the software remain the property of Real Time Logic LLC.  This
00020  *   software may only be used in accordance with the terms and
00021  *   conditions stipulated in the corresponding license agreement under
00022  *   which the software has been supplied.  Any unauthorized use,
00023  *   duplication, transmission, distribution, or disclosure of this
00024  *   software is expressly forbidden.
00025  *                                                                        
00026  *   This Copyright notice may not be removed or modified without prior
00027  *   written consent of Real Time Logic LLC.
00028  *                                                                         
00029  *   Real Time Logic LLC. reserves the right to modify this software
00030  *   without notice.
00031  *
00032  *               http://www.realtimelogic.com
00033  ****************************************************************************
00034  *
00035  */
00036 
00037 #ifndef __DavAuth_h
00038 #define __DavAuth_h
00039 
00040 #include "BasicAuthenticator.h"
00041 #include "DigestAuthenticator.h"
00042 
00043 
00059 typedef struct DavAuth
00060 #ifdef __cplusplus
00061    : public AuthenticatorIntf
00062 {
00068       DavAuth(UserIntf* userDbIntf, const char* realm);
00069 
00072       BasicAuthenticator* getBasicAuth();
00073 
00076       DigestAuthenticator* getDigestAuth();
00077 
00081       void setLoginTracker(LoginTracker* tracker);
00082 #else
00083       {
00084          AuthenticatorIntf superClass; /*as if inherited*/
00085 #endif
00086          LoginRespIntf sendLogin;
00087          BasicAuthenticator basicAuth;
00088          DigestAuthenticator digestAuth;
00089       } DavAuth;
00090 
00091 
00092 #ifdef __cplusplus
00093 extern "C" {
00094 #endif
00095 BA_API void DavAuth_constructor(DavAuth* o,
00096                         UserIntf* userDbIntf,
00097                         const char* realm);
00098 
00099 BA_API void DavAuth_destructor(DavAuth* o);
00100 #define DavAuth_getBasicAuth(o) (&(o)->basicAuth)
00101 #define DavAuth_getDigestAuth(o) (&(o)->digestAuth)
00102 #define DavAuth_setLoginTracker(o, loginTracker) do{\
00103    BasicAuthenticator_setLoginTracker(&(o)->basicAuth, loginTracker);\
00104    DigestAuthenticator_setLoginTracker(&(o)->digestAuth, loginTracker);\
00105    }while(0)
00106 #ifdef __cplusplus
00107 }
00108 inline DavAuth::DavAuth(UserIntf* userDbIntf,const char* realm) {
00109    DavAuth_constructor(this, userDbIntf, realm);
00110 }
00111 inline BasicAuthenticator* DavAuth::getBasicAuth() {
00112    return DavAuth_getBasicAuth(this);
00113 }
00114 inline DigestAuthenticator* DavAuth::getDigestAuth() {
00115    return DavAuth_getDigestAuth(this);
00116 }
00117 inline void DavAuth::setLoginTracker(LoginTracker* tracker) {
00118    DavAuth_setLoginTracker(this, tracker);
00119 }
00120 #endif
00121  /* end of Authentication */
00123 
00124 
00125 #endif