telepathygabble/inc/gheap.h
changeset 10 59927b2d3b75
parent 0 d0f3a028347a
equal deleted inserted replaced
0:d0f3a028347a 10:59927b2d3b75
     1 /*
       
     2  * Header file for GHeap
       
     3  *
       
     4  * 
       
     5  * Copyright (C) 2006 Nokia Corporation.
       
     6  * Contact: Olli Salli (Nokia-M/Helsinki) <olli.salli@nokia.com>
       
     7  *
       
     8  * This library is free software; you can redistribute it and/or
       
     9  * modify it under the terms of the GNU Lesser General Public
       
    10  * License as published by the Free Software Foundation; either
       
    11  * version 2.1 of the License, or (at your option) any later version.
       
    12  *
       
    13  * This library is distributed in the hope that it will be useful,
       
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    16  * Lesser General Public License for more details.
       
    17  *
       
    18  * You should have received a copy of the GNU Lesser General Public
       
    19  * License along with this library; if not, write to the Free Software
       
    20  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
       
    21  */
       
    22 
       
    23 #ifndef __G_HEAP_H__
       
    24 #define __G_HEAP_H__
       
    25 
       
    26 #include <glib.h>
       
    27 
       
    28 typedef struct _GHeap GHeap;
       
    29 
       
    30 GHeap *g_heap_new (GCompareFunc comparator);
       
    31 void g_heap_destroy (GHeap *);
       
    32 void g_heap_clear (GHeap *);
       
    33 
       
    34 void g_heap_add (GHeap *heap, gpointer element);
       
    35 gpointer g_heap_peek_first (GHeap *heap);
       
    36 gpointer g_heap_extract_first (GHeap *heap);
       
    37 
       
    38 guint g_heap_size (GHeap *heap);
       
    39 
       
    40 #endif