SR_Nametags.h

00001 /*---------------------------------------------------------------------------*
00002  *  SR_Nametags.h  *
00003  *                                                                           *
00004  *  Copyright 2007 Nuance Communciations, Inc.                               *
00005  *                                                                           *
00006  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
00007  *  you may not use this file except in compliance with the License.         *
00008  *                                                                           *
00009  *  You may obtain a copy of the License at                                  *
00010  *      http://www.apache.org/licenses/LICENSE-2.0                           *
00011  *                                                                           *
00012  *  Unless required by applicable law or agreed to in writing, software      *
00013  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
00014  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 
00015  *  See the License for the specific language governing permissions and      *
00016  *  limitations under the License.                                           *
00017  *                                                                           *
00018  *---------------------------------------------------------------------------*/
00019 
00020 #ifndef __SR_NAMETAGS_H
00021 #define __SR_NAMETAGS_H
00022 
00023 
00024 
00025 #include "SR_NametagsPrefix.h"
00026 #include "ptypes.h"
00027 #include "pstdio.h"
00028 //#include "SR_Recognizer.h"
00029 #include "SR_NametagDefs.h"
00030 #include "ESR_ReturnCode.h"
00031 
00032 
00043 typedef struct SR_Nametags_t
00044 {
00051   ESR_ReturnCode(*load)(struct SR_Nametags_t* self, const LCHAR* filename);
00052   
00059   ESR_ReturnCode(*save)(struct SR_Nametags_t* self, const LCHAR* filename);
00060   
00067   ESR_ReturnCode(*add)(struct SR_Nametags_t* self, SR_Nametag* nametag);
00068   
00075   ESR_ReturnCode(*remove)(struct SR_Nametags_t* self, const LCHAR* id);
00076   
00083   ESR_ReturnCode(*getSize)(struct SR_Nametags_t* self, size_t* result);
00084   
00093   ESR_ReturnCode(*get)(struct SR_Nametags_t* self, const LCHAR* id, SR_Nametag** nametag);
00094   
00103   ESR_ReturnCode(*getAtIndex)(struct SR_Nametags_t* self, size_t index, SR_Nametag** nametag);
00104   
00112   ESR_ReturnCode(*contains)(struct SR_Nametags_t* self, const LCHAR* id, ESR_BOOL* result);
00113   
00119   ESR_ReturnCode(*destroy)(struct SR_Nametags_t* self);
00120 }
00121 SR_Nametags;
00122 
00134 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsCreate(SR_Nametags** self);
00135 
00142 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsLoad(SR_Nametags* self, const LCHAR* filename);
00143 
00150 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsSave(SR_Nametags* self, const LCHAR* filename);
00151 
00158 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsAdd(SR_Nametags* self, SR_Nametag* nametag);
00159 
00166 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsRemove(SR_Nametags* self, const LCHAR* id);
00167 
00174 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsGetSize(SR_Nametags* self, size_t* result);
00175 
00184 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsGet(SR_Nametags* self, const LCHAR* id, SR_Nametag** nametag);
00185 
00194 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsGetAtIndex(SR_Nametags* self, size_t index, SR_Nametag** nametag);
00195 
00203 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsContains(SR_Nametags* self, const LCHAR* id, ESR_BOOL* result);
00204 
00210 SREC_NAMETAG_API ESR_ReturnCode SR_NametagsDestroy(SR_Nametags* self);
00211 
00220 #endif /* __SR_NAMETAGS_H */

Generated on Thu May 1 15:37:25 2008 for SREC by  doxygen 1.5.3