316aad90e9df5cf7291ec2f64a72da92832ab04e
2 * Copyright 2016 Mark Jansen
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef SDBSTRINGTABLE_H
20 #define SDBSTRINGTABLE_H
28 * Destroy the hashtable and release all resources.
30 * @param [in] table Pointer to table pointer, will be cleared after use
33 void SdbpTableDestroy(struct SdbStringHashTable
* * table
);
36 * Find an entry in the stringtable, or allocate it when an entry could not be found.
37 * - When the string specified does not yet exist, a new entry will be added to the table,
38 * and the pTagid specified will be associated with this string.
39 * - When the string specified does already exist,
40 * the TAGID associated with this string will be returned in pTagid.
43 * @param [in] table Pointer to table pointer, will be allocated when needed.
44 * @param [in] str The string to search for
45 * @param [in,out] pTagid
46 * the data written (in bytes)
48 * @return TRUE if the string was added to the table, FALSE if it already existed
50 BOOL
SdbpAddStringToTable(struct SdbStringHashTable
* * table
, const WCHAR
* str
, TAGID
* pTagid
);
57 #endif // SDBSTRINGTABLE_H