eudora-mac/Include/ldaplibglue.h

1 line
20 KiB
C
Raw Permalink Normal View History

2018-05-23 09:59:15 +00:00
/* Copyright (c) 2017, Computer History Museum All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Computer History Museum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef LDAPLIBGLUE_H #define LDAPLIBGLUE_H #include "lber.h" #include "ldap.h" #include "dflutils.h" #include "dflsuppl.h" #if PRAGMA_IMPORT_SUPPORTED #pragma import on #endif enum { AppEudoraLDAPLibCurVers = 0x01008000, /* current version of LDAP library used by app at time app was built */ AppEudoraLDAPLibMinVers = 0x01008000 /* oldest version of LDAP library supported by app at time app was built */ }; #ifndef LDAP_USE_STD_LINK_MECHANISM enum { kLDAPCallingConventionType = kThinkCStackBased }; #define CALL_LDAP_VIA_UPP GENERATINGCFM #if GENERATINGCFM #define CallLDAPUniversalProc CallUniversalProc #else #define CallLDAPUniversalProc CallThinkCRegD0ResultUPP #endif /* for each routine */ #if GENERATING68KSEGLOAD #pragma mpwc on #endif /****************************************************************************** * * void GetEudoraLDAPLibVers(unsigned long *libVersion, unsigned long *libMinVersion) * * *libVersion and *libMinVersion are the same format as a NumVersion struct, as defined in Types.h * ******************************************************************************/ DECLARE_DFR_EXTERN_UPP(GetEudoraLDAPLibVers, kLDAPCallingConventionType | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(unsigned long*))) | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned long*)))); #if CALL_LDAP_VIA_UPP #define GetEudoraLDAPLibVers(libVersion, libMinVersion) CallLDAPUniversalProc(GetEudoraLDAPLibVersUPP, uppGetEudoraLDAPLibVersProcInfo, (unsigned long*)(libVersion), (unsigned long*)(libMinVersion)) #else typedef void (*GetEudoraLDAPLibVersProcPtr)(unsigned long *libVersion, unsigned long *libMinVersion); #define GetEudoraLDAPLibVers(libVersion, libMinVersion) (*(GetEudoraLDAPLibVersProcPtr)GetEudoraLDAPLibVersUPP)((libVersion), (libMinVersion)) #endif /****************************************************************************** * * LDAP_API(int) LDAP_CALL ldap_count_entries( LDAP *ld, LDAPMessage *chain ) * ******************************************************************************/ DECLARE_DFR_EXTERN_UPP(ldap_count_entries, kLDAPCallingConventionType | RESULT_SIZE(SIZE_CODE(sizeof(int))) | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(LDAP*))) | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(LDAPMessage*)))); #if CALL_LDAP_VIA_UPP #define ldap_coun