epoc32/include/stdapis/dbus-1.0/dbus/dbus-memory.h
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/stdapis/dbus-1.0/dbus/dbus-memory.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,76 @@
     1.4 +/* -*- mode: C; c-file-style: "gnu" -*- */
     1.5 +/* dbus-memory.h  D-Bus memory handling
     1.6 + *
     1.7 + * Copyright (C) 2002  Red Hat Inc.
     1.8 + * Portion Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies). All rights reserved.
     1.9 + * Licensed under the Academic Free License version 2.1
    1.10 + * 
    1.11 + * This program is free software; you can redistribute it and/or modify
    1.12 + * it under the terms of the GNU General Public License as published by
    1.13 + * the Free Software Foundation; either version 2 of the License, or
    1.14 + * (at your option) any later version.
    1.15 + *
    1.16 + * This program is distributed in the hope that it will be useful,
    1.17 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.18 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1.19 + * GNU General Public License for more details.
    1.20 + * 
    1.21 + * You should have received a copy of the GNU General Public License
    1.22 + * along with this program; if not, write to the Free Software
    1.23 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    1.24 + *
    1.25 + */
    1.26 +#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
    1.27 +#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
    1.28 +#endif
    1.29 +
    1.30 +#ifndef DBUS_MEMORY_H
    1.31 +#define DBUS_MEMORY_H
    1.32 +#include <dbus/dbus-macros.h>
    1.33 +#include <stddef.h>
    1.34 +
    1.35 +DBUS_BEGIN_DECLS
    1.36 +
    1.37 +/**
    1.38 + * @addtogroup DBusMemory
    1.39 + * @{
    1.40 + */
    1.41 +
    1.42 +#ifdef __SYMBIAN32__
    1.43 +IMPORT_C
    1.44 +#endif
    1.45 +void* dbus_malloc        (size_t bytes);
    1.46 +#ifdef __SYMBIAN32__
    1.47 +IMPORT_C
    1.48 +#endif
    1.49 +void* dbus_malloc0       (size_t bytes);
    1.50 +#ifdef __SYMBIAN32__
    1.51 +IMPORT_C
    1.52 +#endif
    1.53 +void* dbus_realloc       (void  *memory,
    1.54 +                          size_t bytes);
    1.55 +#ifdef __SYMBIAN32__
    1.56 +IMPORT_C
    1.57 +#endif
    1.58 +void  dbus_free          (void  *memory);
    1.59 +
    1.60 +#define dbus_new(type, count)  ((type*)dbus_malloc (sizeof (type) * (count)));
    1.61 +#define dbus_new0(type, count) ((type*)dbus_malloc0 (sizeof (type) * (count)));
    1.62 +
    1.63 +#ifdef __SYMBIAN32__
    1.64 +IMPORT_C
    1.65 +#endif
    1.66 +void dbus_free_string_array (char **str_array);
    1.67 +
    1.68 +typedef void (* DBusFreeFunction) (void *memory);
    1.69 +
    1.70 +#ifdef __SYMBIAN32__
    1.71 +IMPORT_C
    1.72 +#endif
    1.73 +void dbus_shutdown (void);
    1.74 +
    1.75 +/** @} */
    1.76 +
    1.77 +DBUS_END_DECLS
    1.78 +
    1.79 +#endif /* DBUS_MEMORY_H */