00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #define LIBTEKLTI_EXPORT (0)
00022
00023
00024 #ifndef _cplusplus
00025 #define _cplusplus (0)
00026 #endif
00027
00028 #include "teklti.h"
00029
00030 #ifndef NULLTEST
00031 #define NULLTEST (0)
00032 #endif
00033
00034
00035 MKTEKUUID(UTekStd, "567de9ac-d51c-11d9-871d-000bdbc434d9")
00036 MKTEKDEBUGSTRING(DBTekStd, "TekStd")
00037
00038
00042 TekStd::TekStd()
00043 {
00044 TEKSTD_IMPLEMENT_BEGIN
00045 TEKSTD_IMPLEMENT_ENDVARS
00046 }
00047
00051 TekStd::~TekStd()
00052 {
00053 TEKSTD_IMPLEMENT_FREE
00054 }
00055
00056
00057
00058
00059
00063 unsigned int TekStd::AddRef()
00064 {
00065
00066 __instancecount++;
00067
00068 return __instancecount;
00069 }
00070
00090 TEKERR TekStd::CheckFor(
00091 const uuid_t * UUIDArray,
00092 size_t UUIDArraySize,
00093 unsigned short Flags,
00094 void ** RetVal,
00095 unsigned int ** RefCountPtrRet
00096 )
00097 {
00098 TEKERR result;
00099 size_t i;
00100 size_t j;
00101
00102 #ifndef NO_SIZE_T_CHECKS
00103 if ( UUIDArray == NULL )
00104 {
00105 #ifdef DEBUG_USE_FERROR
00106 fprintf(
00107 stderr,
00108 "POTENTIAL SEGFAULT in interface %s, function CheckFor(): UUIDArray is null!\n",
00109 TEKDEBUGSTRING(DBTekStd)
00110 );
00111 #endif
00112 return TEKERR_POINTER;
00113 }
00114
00115 if ( Flags )
00116 {
00117 if ( RetVal == NULL )
00118 {
00119 #ifdef DEBUG_USE_FERROR
00120 fprintf(
00121 stderr,
00122 "POTENTIAL SEGFAULT in interface %s, function CheckFor(): RetVal is null!\n",
00123 TEKDEBUGSTRING(DBTekStd)
00124 );
00125 #endif
00126 return TEKERR_POINTER;
00127 }
00128 }
00129 #endif
00130
00131 for ( i=0; i < UUIDArraySize; i++ )
00132 {
00133
00134
00135
00136
00137 for ( j=0; j < this->__uuidarraycount; j++ )
00138 if ( uuid_compare(this->__uuidarray[j], UUIDArray[i]) == 0 )
00139 goto FoundUUID;
00140
00141
00142
00143 i++;
00144
00145 result = i << (8 * sizeof(short));
00146
00147 result |= TEKERR_NOTIMPL;
00148
00149 return result;
00150 FoundUUID:
00151 ;
00152 }
00153
00154
00155
00156 if ( Flags )
00157 {
00158
00159 this->AddRef();
00160
00161 *RetVal = this;
00162 }
00163
00164
00165 return TEKERR_OK;
00166 }
00167
00171 unsigned int TekStd::Release()
00172 {
00173
00174 __instancecount--;
00175
00176
00177 if ( __instancecount == 0 )
00178 {
00179
00180 delete this;
00181
00182 return 0;
00183 }
00184
00185
00186 return __instancecount;
00187 }
00188
00189 TEKERR TekStd::CallFunc(
00190 const uchar_t * FuncName,
00191 void * RetVal,
00192 unsigned short ParamsCount,
00193 void ** Params
00194 )
00195 {
00196 return TEKERR_NOTIMPL;
00197 }
00198
00199
00200