stringref.h

Go to the documentation of this file.
00001 /* TODO: Can we just replace this whole thing with a GCache */
00002 
00008 /* purple
00009  *
00010  * Purple is the legal property of its developers, whose names are too numerous
00011  * to list here.  Please refer to the COPYRIGHT file distributed with this
00012  * source distribution.
00013  *
00014  * This program is free software; you can redistribute it and/or modify
00015  * it under the terms of the GNU General Public License as published by
00016  * the Free Software Foundation; either version 2 of the License, or
00017  * (at your option) any later version.
00018  *
00019  * This program is distributed in the hope that it will be useful,
00020  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00022  * GNU General Public License for more details.
00023  *
00024  * You should have received a copy of the GNU General Public License
00025  * along with this program; if not, write to the Free Software
00026  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00027  *
00028  */
00029 #ifndef _PURPLE_STRINGREF_H_
00030 #define _PURPLE_STRINGREF_H_
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 typedef struct _PurpleStringref PurpleStringref;
00037 
00048 PurpleStringref *purple_stringref_new(const char *value);
00049 
00062 PurpleStringref *purple_stringref_new_noref(const char *value);
00063 
00074 PurpleStringref *purple_stringref_printf(const char *format, ...);
00075 
00083 PurpleStringref *purple_stringref_ref(PurpleStringref *stringref);
00084 
00092 void purple_stringref_unref(PurpleStringref *stringref);
00093 
00110 const char *purple_stringref_value(const PurpleStringref *stringref);
00111 
00123 int purple_stringref_cmp(const PurpleStringref *s1, const PurpleStringref *s2);
00124 
00132 size_t purple_stringref_len(const PurpleStringref *stringref);
00133 
00134 #ifdef __cplusplus
00135 }
00136 #endif
00137 
00138 #endif /* _PURPLE_STRINGREF_H_ */