ofdbus/dbus-glib/tsrc/testapps/file-transfer-server/inc/file-transfer-server.h
changeset 31 ce057bb09d0b
parent 0 e4d67989cc36
equal deleted inserted replaced
30:e20de85af2ee 31:ce057bb09d0b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __SOME_OBJECT_H__
       
    20 #define __SOME_OBJECT_H__
       
    21 
       
    22 #include <glib-object.h>
       
    23 
       
    24 typedef struct _SomeObject SomeObject;
       
    25 struct _SomeObject
       
    26 {
       
    27 	GObject		parent_obj;
       
    28 	gint 		m_a;
       
    29 	gchar*		m_b;
       
    30 	gfloat		m_c;
       
    31 };
       
    32 
       
    33 typedef struct _SomeObjectClass SomeObjectClass;
       
    34 struct _SomeObjectClass
       
    35 {
       
    36 	GObjectClass	parent_class;
       
    37 
       
    38 	/* Some useful methods may follow. */
       
    39 	gboolean	(*method1)	(SomeObject *self, gint x,GArray *y,gint *z,GError **error);
       
    40 	void		(*method2)	(SomeObject *self, gchar*);
       
    41 };
       
    42 
       
    43 GType	some_object_get_type ();
       
    44 
       
    45 gboolean some_object_method1 (SomeObject *self, gint x,GArray *y,gint *z,GError **);	/* virtual */
       
    46 void	some_object_method2 (SomeObject *self, gchar*);	/* virtual */
       
    47 void	some_object_method3 (SomeObject *self, gfloat);	/* non-virtual */
       
    48 
       
    49 
       
    50 /* Handy macros */
       
    51 #define SOME_OBJECT_TYPE		(some_object_get_type ())
       
    52 #define SOME_OBJECT(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), SOME_OBJECT_TYPE, SomeObject))
       
    53 #define SOME_OBJECT_CLASS(c)		(G_TYPE_CHECK_CLASS_CAST ((c), SOME_OBJECT_TYPE, SomeObjectClass))
       
    54 #define SOME_IS_OBJECT(obj)		(G_TYPE_CHECK_TYPE ((obj), SOME_OBJECT_TYPE))
       
    55 #define SOME_IS_OBJECT_CLASS(c)		(G_TYPE_CHECK_CLASS_TYPE ((c), SOME_OBJECT_TYPE))
       
    56 #define SOME_OBJECT_GET_CLASS(obj)	(G_TYPE_INSTANCE_GET_CLASS ((obj), SOME_OBJECT_TYPE, SomeObjectClass))
       
    57 
       
    58 #endif