Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

value.h File Reference

Value wrapper API. More...

#include <glib.h>

Include dependency graph for value.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  GaimValue
 A wrapper for a type, subtype, and specific type of value. More...

Enumerations

enum  GaimType {
  GAIM_TYPE_UNKNOWN = 0, GAIM_TYPE_SUBTYPE, GAIM_TYPE_CHAR, GAIM_TYPE_UCHAR,
  GAIM_TYPE_BOOLEAN, GAIM_TYPE_SHORT, GAIM_TYPE_USHORT, GAIM_TYPE_INT,
  GAIM_TYPE_UINT, GAIM_TYPE_LONG, GAIM_TYPE_ULONG, GAIM_TYPE_INT64,
  GAIM_TYPE_UINT64, GAIM_TYPE_STRING, GAIM_TYPE_OBJECT, GAIM_TYPE_POINTER,
  GAIM_TYPE_ENUM, GAIM_TYPE_BOXED
}
 Specific value types. More...
enum  GaimSubType {
  GAIM_SUBTYPE_UNKNOWN = 0, GAIM_SUBTYPE_ACCOUNT, GAIM_SUBTYPE_BLIST, GAIM_SUBTYPE_BLIST_BUDDY,
  GAIM_SUBTYPE_BLIST_GROUP, GAIM_SUBTYPE_BLIST_CHAT, GAIM_SUBTYPE_CONNECTION, GAIM_SUBTYPE_CONVERSATION,
  GAIM_SUBTYPE_CONV_WINDOW, GAIM_SUBTYPE_PLUGIN, GAIM_SUBTYPE_BLIST_NODE
}
 Gaim-specific subtype values.

Functions

GaimValuegaim_value_new (GaimType type,...)
 Creates a new GaimValue.
GaimValuegaim_value_new_outgoing (GaimType type,...)
 Creates a new outgoing GaimValue.
void gaim_value_destroy (GaimValue *value)
 Destroys a GaimValue.
GaimValuegaim_value_dup (const GaimValue *value)
 Duplicated a GaimValue.
GaimType gaim_value_get_type (const GaimValue *value)
 Returns a value's type.
unsigned int gaim_value_get_subtype (const GaimValue *value)
 Returns a value's subtype.
const char * gaim_value_get_specific_type (const GaimValue *value)
 Returns a value's specific type.
gboolean gaim_value_is_outgoing (const GaimValue *value)
 Returns whether or not the value is an outgoing value.
void gaim_value_set_char (GaimValue *value, char data)
 Sets the value's character data.
void gaim_value_set_uchar (GaimValue *value, unsigned char data)
 Sets the value's unsigned character data.
void gaim_value_set_boolean (GaimValue *value, gboolean data)
 Sets the value's boolean data.
void gaim_value_set_short (GaimValue *value, short data)
 Sets the value's short integer data.
void gaim_value_set_ushort (GaimValue *value, unsigned short data)
 Sets the value's unsigned short integer data.
void gaim_value_set_int (GaimValue *value, int data)
 Sets the value's integer data.
void gaim_value_set_uint (GaimValue *value, unsigned int data)
 Sets the value's unsigned integer data.
void gaim_value_set_long (GaimValue *value, long data)
 Sets the value's long integer data.
void gaim_value_set_ulong (GaimValue *value, unsigned long data)
 Sets the value's unsigned long integer data.
void gaim_value_set_int64 (GaimValue *value, gint64 data)
 Sets the value's 64-bit integer data.
void gaim_value_set_uint64 (GaimValue *value, guint64 data)
 Sets the value's unsigned 64-bit integer data.
void gaim_value_set_string (GaimValue *value, const char *data)
 Sets the value's string data.
void gaim_value_set_object (GaimValue *value, void *data)
 Sets the value's object data.
void gaim_value_set_pointer (GaimValue *value, void *data)
 Sets the value's pointer data.
void gaim_value_set_enum (GaimValue *value, int data)
 Sets the value's enum data.
void gaim_value_set_boxed (GaimValue *value, void *data)
 Sets the value's boxed data.
char gaim_value_get_char (const GaimValue *value)
 Returns the value's character data.
unsigned char gaim_value_get_uchar (const GaimValue *value)
 Returns the value's unsigned character data.
gboolean gaim_value_get_boolean (const GaimValue *value)
 Returns the value's boolean data.
short gaim_value_get_short (const GaimValue *value)
 Returns the value's short integer data.
unsigned short gaim_value_get_ushort (const GaimValue *value)
 Returns the value's unsigned short integer data.
int gaim_value_get_int (const GaimValue *value)
 Returns the value's integer data.
unsigned int gaim_value_get_uint (const GaimValue *value)
 Returns the value's unsigned integer data.
long gaim_value_get_long (const GaimValue *value)
 Returns the value's long integer data.
unsigned long gaim_value_get_ulong (const GaimValue *value)
 Returns the value's unsigned long integer data.
gint64 gaim_value_get_int64 (const GaimValue *value)
 Returns the value's 64-bit integer data.
guint64 gaim_value_get_uint64 (const GaimValue *value)
 Returns the value's unsigned 64-bit integer data.
const char * gaim_value_get_string (const GaimValue *value)
 Returns the value's string data.
void * gaim_value_get_object (const GaimValue *value)
 Returns the value's object data.
void * gaim_value_get_pointer (const GaimValue *value)
 Returns the value's pointer data.
int gaim_value_get_enum (const GaimValue *value)
 Returns the value's enum data.
void * gaim_value_get_boxed (const GaimValue *value)
 Returns the value's boxed data.


Detailed Description

Value wrapper API.

gaim

Gaim is the legal property of its developers, whose names are too numerous to list here. Please refer to the COPYRIGHT file distributed with this source distribution.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Enumeration Type Documentation

enum GaimType
 

Specific value types.

Enumeration values:
GAIM_TYPE_UNKNOWN  Unknown type.
GAIM_TYPE_SUBTYPE  Subtype.
GAIM_TYPE_CHAR  Character.
GAIM_TYPE_UCHAR  Unsigned character.
GAIM_TYPE_BOOLEAN  Boolean.
GAIM_TYPE_SHORT  Short integer.
GAIM_TYPE_USHORT  Unsigned short integer.
GAIM_TYPE_INT  Integer.
GAIM_TYPE_UINT  Unsigned integer.
GAIM_TYPE_LONG  Long integer.
GAIM_TYPE_ULONG  Unsigned long integer.
GAIM_TYPE_INT64  64-bit integer
GAIM_TYPE_UINT64  64-bit unsigned integer
GAIM_TYPE_STRING  String.
GAIM_TYPE_OBJECT  Object pointer.
GAIM_TYPE_POINTER  Generic pointer.
GAIM_TYPE_ENUM  Enum.
GAIM_TYPE_BOXED  Boxed pointer with specific type.


Function Documentation

void gaim_value_destroy GaimValue value  ) 
 

Destroys a GaimValue.

Parameters:
value The value to destroy.

GaimValue* gaim_value_dup const GaimValue value  ) 
 

Duplicated a GaimValue.

Parameters:
value The value to duplicate.
Returns:
The duplicate value.

gboolean gaim_value_get_boolean const GaimValue value  ) 
 

Returns the value's boolean data.

Parameters:
value The value.
Returns:
The boolean data.

void* gaim_value_get_boxed const GaimValue value  ) 
 

Returns the value's boxed data.

Parameters:
value The value.
Returns:
The boxed data.

char gaim_value_get_char const GaimValue value  ) 
 

Returns the value's character data.

Parameters:
value The value.
Returns:
The character data.

int gaim_value_get_enum const GaimValue value  ) 
 

Returns the value's enum data.

Parameters:
value The value.
Returns:
The enum data.

int gaim_value_get_int const GaimValue value  ) 
 

Returns the value's integer data.

Parameters:
value The value.
Returns:
The integer data.

gint64 gaim_value_get_int64 const GaimValue value  ) 
 

Returns the value's 64-bit integer data.

Parameters:
value The value.
Returns:
The 64-bit integer data.

long gaim_value_get_long const GaimValue value  ) 
 

Returns the value's long integer data.

Parameters:
value The value.
Returns:
The long integer data.

void* gaim_value_get_object const GaimValue value  ) 
 

Returns the value's object data.

Parameters:
value The value.
Returns:
The object data.

void* gaim_value_get_pointer const GaimValue value  ) 
 

Returns the value's pointer data.

Parameters:
value The value.
Returns:
The pointer data.

short gaim_value_get_short const GaimValue value  ) 
 

Returns the value's short integer data.

Parameters:
value The value.
Returns:
The short integer data.

const char* gaim_value_get_specific_type const GaimValue value  ) 
 

Returns a value's specific type.

If the value's type is not GAIM_TYPE_BOXED, this will return NULL.

Returns:
The value's specific type, or NULL if not GAIM_TYPE_BOXED.

const char* gaim_value_get_string const GaimValue value  ) 
 

Returns the value's string data.

Parameters:
value The value.
Returns:
The string data.

unsigned int gaim_value_get_subtype const GaimValue value  ) 
 

Returns a value's subtype.

If the value's type is not GAIM_TYPE_SUBTYPE, this will return 0. Subtypes should never have a subtype of 0.

Returns:
The value's subtype, or 0 if type is not GAIM_TYPE_SUBTYPE.

GaimType gaim_value_get_type const GaimValue value  ) 
 

Returns a value's type.

Returns:
The value's type.

unsigned char gaim_value_get_uchar const GaimValue value  ) 
 

Returns the value's unsigned character data.

Parameters:
value The value.
Returns:
The unsigned character data.

unsigned int gaim_value_get_uint const GaimValue value  ) 
 

Returns the value's unsigned integer data.

Parameters:
value The value.
Returns:
The unsigned integer data.

guint64 gaim_value_get_uint64 const GaimValue value  ) 
 

Returns the value's unsigned 64-bit integer data.

Parameters:
value The value.
Returns:
The unsigned 64-bit integer data.

unsigned long gaim_value_get_ulong const GaimValue value  ) 
 

Returns the value's unsigned long integer data.

Parameters:
value The value.
Returns:
The unsigned long integer data.

unsigned short gaim_value_get_ushort const GaimValue value  ) 
 

Returns the value's unsigned short integer data.

Parameters:
value The value.
Returns:
The unsigned short integer data.

gboolean gaim_value_is_outgoing const GaimValue value  ) 
 

Returns whether or not the value is an outgoing value.

Parameters:
value The value.
Returns:
TRUE if the value is outgoing, or FALSE otherwise.

GaimValue* gaim_value_new GaimType  type,
  ...
 

Creates a new GaimValue.

This function takes a type and, depending on that type, a sub-type or specific type.

If type is GAIM_TYPE_POINTER, the next parameter must be a string representing the specific type.

If type is GAIM_TYPE_SUBTYPE, the next parameter must be a integer or enum representing the sub-type.

If the subtype or specific type is not set when required, random errors may occur. You have been warned.

Parameters:
type The type.
Returns:
The new value.

GaimValue* gaim_value_new_outgoing GaimType  type,
  ...
 

Creates a new outgoing GaimValue.

This function takes a type and, depending on that type, a sub-type or specific type.

If type is GAIM_TYPE_POINTER, the next parameter must be a string representing the specific type.

If type is GAIM_TYPE_SUBTYPE, the next parameter must be a integer or enum representing the sub-type.

If the sub-type or specific type is not set when required, random errors may occur. You have been warned.

Parameters:
type The type.
Returns:
The new value.

void gaim_value_set_boolean GaimValue value,
gboolean  data
 

Sets the value's boolean data.

Parameters:
value The value.
data The boolean data.

void gaim_value_set_boxed GaimValue value,
void *  data
 

Sets the value's boxed data.

Parameters:
value The value.
data The boxed data.

void gaim_value_set_char GaimValue value,
char  data
 

Sets the value's character data.

Parameters:
value The value.
data The character data.

void gaim_value_set_enum GaimValue value,
int  data
 

Sets the value's enum data.

Parameters:
value The value.
data The enum data.

void gaim_value_set_int GaimValue value,
int  data
 

Sets the value's integer data.

Parameters:
value The value.
data The integer data.

void gaim_value_set_int64 GaimValue value,
gint64  data
 

Sets the value's 64-bit integer data.

Parameters:
value The value.
data The 64-bit integer data.

void gaim_value_set_long GaimValue value,
long  data
 

Sets the value's long integer data.

Parameters:
value The value.
data The long integer data.

void gaim_value_set_object GaimValue value,
void *  data
 

Sets the value's object data.

Parameters:
value The value.
data The object data.

void gaim_value_set_pointer GaimValue value,
void *  data
 

Sets the value's pointer data.

Parameters:
value The value.
data The pointer data.

void gaim_value_set_short GaimValue value,
short  data
 

Sets the value's short integer data.

Parameters:
value The value.
data The short integer data.

void gaim_value_set_string GaimValue value,
const char *  data
 

Sets the value's string data.

Parameters:
value The value.
data The string data.

void gaim_value_set_uchar GaimValue value,
unsigned char  data
 

Sets the value's unsigned character data.

Parameters:
value The value.
data The unsigned character data.

void gaim_value_set_uint GaimValue value,
unsigned int  data
 

Sets the value's unsigned integer data.

Parameters:
value The value.
data The unsigned integer data.

void gaim_value_set_uint64 GaimValue value,
guint64  data
 

Sets the value's unsigned 64-bit integer data.

Parameters:
value The value.
data The unsigned 64-bit integer data.

void gaim_value_set_ulong GaimValue value,
unsigned long  data
 

Sets the value's unsigned long integer data.

Parameters:
value The value.
data The unsigned long integer data.

void gaim_value_set_ushort GaimValue value,
unsigned short  data
 

Sets the value's unsigned short integer data.

Parameters:
value The value.
data The unsigned short integer data.


Generated on Fri Apr 22 05:21:30 2005 for gaim by  doxygen 1.3.9.1