/* ====================================================================
 * FTD4Linux Software License, Version 1.0
 *
 * Copyright (c) 2000-2004 The FTD4Linux Development Team.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution,
 *    if any, must include the following acknowledgment:
 *       "This product includes software developed by the
 *        FTD4Linux Development Team (http://www.ftd4linux.2y.net/)."
 *    Alternately, this acknowledgment may appear in the software itself,
 *    if and wherever such third-party acknowledgments normally appear.
 *
 * 4. The names "FTD" and "FTD4Linux" must
 *    not be used to endorse or promote products derived from this
 *    software without prior written permission. For written
 *    permission, please contact alguno@ftd4linux.2y.net.
 *
 * 5. Products derived from this software may not be called "FTD4Linux",
 *    nor may "FTD4Linux" appear in their name, without prior written
 *    permission of the FTD4Linux Development Team.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE FTD4LINUX DEVELOPMENT TEAM OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 */

#ifndef _FTD_EVENT_H_
#define _FTD_EVENT_H_

struct FTDEventObject
{
    GObject parent;

    GStaticRWLock rwlock;

    FtdEvent *event;
};

#if 0
#define ftd_tree_new                    g_tree_new
#define ftd_tree_insert                 g_tree_insert
#define ftd_tree_foreach                g_tree_foreach
#define ftd_tree_destroy                g_tree_destroy
#define ftd_tree_search                 g_tree_search
#define ftd_tree_remove                 g_tree_remove
#define ftd_tree_num_nodes              g_tree_nnodes
#define ftd_tree_lookup                 g_tree_lookup
#define ftd_tree_replace                g_tree_replace
#else
#define ftd_tree_new(x)                 g_hash_table_new(NULL, NULL)
#define ftd_tree_insert                 g_hash_table_insert
#define ftd_tree_foreach(a,b,c)         g_hash_table_foreach(a, (GHFunc) b, c)
#define ftd_tree_destroy                g_hash_table_destroy
#define ftd_tree_search                 g_hash_table_find
#define ftd_tree_remove                 g_hash_table_remove
#define ftd_tree_num_nodes              g_hash_table_size
#define ftd_tree_lookup                 g_hash_table_lookup
#define ftd_tree_replace                g_hash_table_replace
#endif

FTDEventlist    *ftd_eventlist_new(void);
void             ftd_eventlist_destroy(FTDEventlist *obj);

FtdEvent        *ftd_eventinfo_findpost(int eventid);

#endif
