2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
20 typedef enum _hashtable_size {
29 typedef struct _ht_entry {
32 struct _ht_entry* next;
35 typedef struct _hashtable {
40 hashtable* hashtable_create ( ht_size_t tablesize );
41 void hashtable_destroy ( hashtable* ht_table );
43 // return 1 if put is successful
44 // return 0 if put is failed
45 int hashtable_put ( hashtable* ht_table, int key, int value );
47 // return 1 if a entry is found in hash table
48 // return 0 if a entry is not found in hash table
49 // output value is stored in (*value)
50 int hashtable_get ( hashtable* ht_table, int key, int* value );
52 #endif // __HASHTABLE_H