root/trunk/libtinymailui/tny-platform-factory.h

Revision 3304 (checked in by pvanhoof, 10 months ago)

2008-01-28 Philip Van Hoof <pvanhoof@gnome.org>

        • Removed the _func from all the interfaces and virtual function

pointers in the classes. This should not be an ABI but is an API
change.

        • This was a major API change
Line 
1 #ifndef TNY_PLATFORM_FACTORY_H
2 #define TNY_PLATFORM_FACTORY_H
3
4 /* libtinymail - The Tiny Mail base library
5  * Copyright (C) 2006-2007 Philip Van Hoof <pvanhoof@gnome.org>
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 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 self library; if not, write to the
19  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  * Boston, MA 02110-1301, USA.
21  */
22
23 #include <glib.h>
24 #include <glib-object.h>
25 #include <tny-shared.h>
26 #include <tny-msg-view.h>
27 #include <tny-device.h>
28 #include <tny-account-store.h>
29
30 G_BEGIN_DECLS
31
32 #define TNY_TYPE_PLATFORM_FACTORY             (tny_platform_factory_get_type ())
33 #define TNY_PLATFORM_FACTORY(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_TYPE_PLATFORM_FACTORY, TnyPlatformFactory))
34 #define TNY_IS_PLATFORM_FACTORY(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_TYPE_PLATFORM_FACTORY))
35 #define TNY_PLATFORM_FACTORY_GET_IFACE(inst)  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), TNY_TYPE_PLATFORM_FACTORY, TnyPlatformFactoryIface))
36
37 typedef struct _TnyPlatformFactory TnyPlatformFactory;
38 typedef struct _TnyPlatformFactoryIface TnyPlatformFactoryIface;
39
40 struct _TnyPlatformFactoryIface
41 {
42         GTypeInterface parent;
43
44         TnyAccountStore* (*new_account_store) (TnyPlatformFactory *self);
45         TnyDevice* (*new_device) (TnyPlatformFactory *self);
46         TnyMsgView* (*new_msg_view) (TnyPlatformFactory *self);
47         TnyMsg* (*new_msg) (TnyPlatformFactory *self);
48         TnyMimePart* (*new_mime_part) (TnyPlatformFactory *self);
49         TnyPasswordGetter* (*new_password_getter) (TnyPlatformFactory *self);
50 };
51
52 GType tny_platform_factory_get_type (void);
53
54 TnyAccountStore* tny_platform_factory_new_account_store (TnyPlatformFactory *self);
55 TnyDevice* tny_platform_factory_new_device (TnyPlatformFactory *self);
56 TnyMsgView* tny_platform_factory_new_msg_view (TnyPlatformFactory *self);
57 TnyMsg* tny_platform_factory_new_msg (TnyPlatformFactory *self);
58 TnyMimePart* tny_platform_factory_new_mime_part (TnyPlatformFactory *self);
59 TnyPasswordGetter* tny_platform_factory_new_password_getter (TnyPlatformFactory *self);
60
61 G_END_DECLS
62
63 #endif
Note: See TracBrowser for help on using the browser.