1/*---------------------------------------------------------------------------*
2 *  SR_NametagsImpl.h  *
3 *                                                                           *
4 *  Copyright 2007, 2008 Nuance Communciations, Inc.                               *
5 *                                                                           *
6 *  Licensed under the Apache License, Version 2.0 (the 'License');          *
7 *  you may not use this file except in compliance with the License.         *
8 *                                                                           *
9 *  You may obtain a copy of the License at                                  *
10 *      http://www.apache.org/licenses/LICENSE-2.0                           *
11 *                                                                           *
12 *  Unless required by applicable law or agreed to in writing, software      *
13 *  distributed under the License is distributed on an 'AS IS' BASIS,        *
14 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
15 *  See the License for the specific language governing permissions and      *
16 *  limitations under the License.                                           *
17 *                                                                           *
18 *---------------------------------------------------------------------------*/
19
20#ifndef __SR_NAMETAGSIMPL_H
21#define __SR_NAMETAGSIMPL_H
22
23
24
25#include "ArrayList.h"
26#include "ESR_ReturnCode.h"
27#include "HashMap.h"
28#include "SR_EventLog.h"
29#include "SR_Nametag.h"
30#include "SR_Nametags.h"
31
32/**
33 * Nametags implementation.
34 */
35typedef struct SR_NametagsImpl_t
36{
37  /**
38   * Interface functions that must be implemented.
39   */
40  SR_Nametags Interface;
41  /**
42   * Nametag collection.
43   */
44  HashMap* value;
45  /**
46   * OSI event-log.
47   */
48  SR_EventLog* eventLog;
49  /**
50   * Eventlog logging level.
51   */
52  size_t logLevel;
53}
54SR_NametagsImpl;
55
56
57/**
58 * Default implementation.
59 */
60SREC_NAMETAG_API ESR_ReturnCode SR_NametagsLoadImpl(SR_Nametags* self, const LCHAR* filename);
61/**
62 * Default implementation.
63 */
64SREC_NAMETAG_API ESR_ReturnCode SR_NametagsSaveImpl(SR_Nametags* self, const LCHAR* filename);
65/**
66 * Default implementation.
67 */
68SREC_NAMETAG_API ESR_ReturnCode SR_NametagsAddImpl(SR_Nametags* self, SR_Nametag* nametag);
69/**
70 * Default implementation.
71 */
72SREC_NAMETAG_API ESR_ReturnCode SR_NametagsRemoveImpl(SR_Nametags* self, const LCHAR* id);
73/**
74 * Default implementation.
75 */
76SREC_NAMETAG_API ESR_ReturnCode SR_NametagsGetSizeImpl(SR_Nametags* self, size_t* result);
77/**
78 * Default implementation.
79 */
80SREC_NAMETAG_API ESR_ReturnCode SR_NametagsGetImpl(SR_Nametags* self, const LCHAR* id, SR_Nametag** nametag);
81/**
82 * Default implementation.
83 */
84SREC_NAMETAG_API ESR_ReturnCode SR_NametagsGetAtIndexImpl(SR_Nametags* self, size_t index, SR_Nametag** nametag);
85/**
86 * Default implementation.
87 */
88SREC_NAMETAG_API ESR_ReturnCode SR_NametagsContainsImpl(SR_Nametags* self, const LCHAR* id, ESR_BOOL* result);
89/**
90 * Default implementation.
91 */
92SREC_NAMETAG_API ESR_ReturnCode SR_NametagsDestroyImpl(SR_Nametags* self);
93
94#endif /* __SR_NAMETAGSIMPL_H */
95