TnyPlatformFactory

TnyPlatformFactory — A factory that returns implementations for a platform

Synopsis




                    TnyPlatformFactory;
                    TnyPlatformFactoryIface;
TnyAccountStore*    tny_platform_factory_new_account_store
                                                        (TnyPlatformFactory *self);
TnyDevice*          tny_platform_factory_new_device     (TnyPlatformFactory *self);
TnyMsgView*         tny_platform_factory_new_msg_view   (TnyPlatformFactory *self);
TnyMsg*             tny_platform_factory_new_msg        (TnyPlatformFactory *self);
TnyMimePart*        tny_platform_factory_new_mime_part  (TnyPlatformFactory *self);
TnyPasswordGetter*  tny_platform_factory_new_password_getter
                                                        (TnyPlatformFactory *self);

Object Hierarchy


  GInterface
   +----TnyPlatformFactory

Prerequisites

TnyPlatformFactory requires GObject.

Description

A factory type that returns specific implementations for a specific platform.

Details

TnyPlatformFactory

typedef struct _TnyPlatformFactory TnyPlatformFactory;

A factory that creates some instances

free-function: g_object_unref


TnyPlatformFactoryIface

typedef struct {
	GTypeInterface parent;

	TnyAccountStore* (*new_account_store) (TnyPlatformFactory *self);
	TnyDevice* (*new_device) (TnyPlatformFactory *self);
	TnyMsgView* (*new_msg_view) (TnyPlatformFactory *self);
	TnyMsg* (*new_msg) (TnyPlatformFactory *self);
	TnyMimePart* (*new_mime_part) (TnyPlatformFactory *self);
	TnyPasswordGetter* (*new_password_getter) (TnyPlatformFactory *self);
} TnyPlatformFactoryIface;


tny_platform_factory_new_account_store ()

TnyAccountStore*    tny_platform_factory_new_account_store
                                                        (TnyPlatformFactory *self);

Create a new TnyAccountStore instance. The returned instance must be unreferenced after use.

When implementing a platform-specific library, return a new TnyAccountStore instance. It's allowed to reuse one instance, just make sure that you add a reference.

self : a TnyPlatformFactory
Returns : (caller-owns): a TnyAccountStore instance

Since 1.0 audience: application-developer, type-implementer


tny_platform_factory_new_device ()

TnyDevice*          tny_platform_factory_new_device     (TnyPlatformFactory *self);

Create a new TnyDevice instance. The returned instance must be unreferenced after use.

When implementing a platform-specific library, return a new TnyDevice instance. It's allowed to reuse one instance, just make sure that you add a reference.

self : a TnyPlatformFactory
Returns : (caller-owns): a TnyDevice instance

Since 1.0 audience: application-developer, type-implementer


tny_platform_factory_new_msg_view ()

TnyMsgView*         tny_platform_factory_new_msg_view   (TnyPlatformFactory *self);

Create a new TnyMsgView instance. The returned instance must be unreferenced after use.

When implementing a platform-specific library, return a new TnyMsgView instance. It's allowed to reuse one instance, just make sure that you add a reference.

self : a TnyPlatformFactory
Returns : (caller-owns): a TnyMsgView instance

Since 1.0 audience: application-developer, type-implementer


tny_platform_factory_new_msg ()

TnyMsg*             tny_platform_factory_new_msg        (TnyPlatformFactory *self);

Create a new TnyMsg instance. The returned instance must be unreferenced after use.

self : a TnyPlatformFactory
Returns : (caller-owns): a TnyMsg instance

Since 1.0 audience: application-developer, type-implementer


tny_platform_factory_new_mime_part ()

TnyMimePart*        tny_platform_factory_new_mime_part  (TnyPlatformFactory *self);

Create a new TnyMimePart instance. The returned instance must be unreferenced after use.

self : a TnyPlatformFactory
Returns : (caller-owns): a TnyMimePart instance

Since 1.0 audience: application-developer, type-implementer


tny_platform_factory_new_password_getter ()

TnyPasswordGetter*  tny_platform_factory_new_password_getter
                                                        (TnyPlatformFactory *self);

Create a new TnyPasswordGetter instance. The returned instance must be unreferenced after use.

self : a TnyPlatformFactory
Returns : (caller-owns): a TnyPasswordGetter instance

Since 1.0 audience: application-developer, type-implementer

See Also

TnyDevice, TnyMsgView, TnySaveStrategy, TnyAccountStore