telepathygabble/inc/util.h
changeset 10 59927b2d3b75
parent 0 d0f3a028347a
equal deleted inserted replaced
0:d0f3a028347a 10:59927b2d3b75
     1 /*
       
     2  * util.h - Headers for Gabble utility functions
       
     3  * Copyright (C) 2006 Collabora Ltd.
       
     4  *   @author Robert McQueen <robert.mcqueen@collabora.co.uk>
       
     5  * 
       
     6  *
       
     7  * This library is free software; you can redistribute it and/or
       
     8  * modify it under the terms of the GNU Lesser General Public
       
     9  * License as published by the Free Software Foundation; either
       
    10  * version 2.1 of the License, or (at your option) any later version.
       
    11  *
       
    12  * This library is distributed in the hope that it will be useful,
       
    13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
       
    15  * Lesser General Public License for more details.
       
    16  *
       
    17  * You should have received a copy of the GNU Lesser General Public
       
    18  * License along with this library; if not, write to the Free Software
       
    19  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
       
    20  */
       
    21 
       
    22 #include <glib.h>
       
    23 #include "loudmouth/loudmouth.h"
       
    24 
       
    25 #include "gabble-types.h"
       
    26 
       
    27 #ifndef __GABBLE_UTIL_H__
       
    28 #define __GABBLE_UTIL_H__
       
    29 
       
    30 gchar *
       
    31 sha1_hex (const gchar *bytes, guint len);
       
    32 gboolean g_strdiff (const gchar *left, const gchar *right);
       
    33 void lm_message_node_add_own_nick (LmMessageNode *node, GabbleConnection *conn);
       
    34 void lm_message_node_steal_children (LmMessageNode *snatcher, LmMessageNode *mum);
       
    35 gboolean lm_message_node_has_namespace (LmMessageNode *node, const gchar *ns, const gchar *tag);
       
    36 LmMessageNode *lm_message_node_get_child_with_namespace (LmMessageNode *node, const gchar *name, const gchar *ns);
       
    37 
       
    38 /* format: a@b/c */
       
    39 void gabble_decode_jid (const gchar *jid, gchar **a, gchar **b, gchar **c);
       
    40 
       
    41 gpointer gabble_mixin_offset_cast (gpointer instance, guint offset);
       
    42 
       
    43 #endif /* __GABBLE_UTIL_H__ */