TnyCombinedAccount

TnyCombinedAccount — A account type that can combine a store and a transport account

Synopsis




                    TnyCombinedAccount;
TnyAccount*         tny_combined_account_new            (TnyTransportAccount *ta,
                                                         TnyStoreAccount *sa);
TnyTransportAccount* tny_combined_account_get_transport_account
                                                        (TnyCombinedAccount *self);
TnyStoreAccount*    tny_combined_account_get_store_account
                                                        (TnyCombinedAccount *self);

Object Hierarchy


  GObject
   +----TnyCombinedAccount

Implemented Interfaces

TnyCombinedAccount implements TnyFolderStore, TnyAccount, TnyStoreAccount and TnyTransportAccount.

Description

A TnyAccount implementation that decorates a TnyStoreAccount and a TnyTransportAccount

Details

TnyCombinedAccount

typedef struct _TnyCombinedAccount TnyCombinedAccount;


tny_combined_account_new ()

TnyAccount*         tny_combined_account_new            (TnyTransportAccount *ta,
                                                         TnyStoreAccount *sa);

Create a decorator for ta, in case the tny_transport_account_send is used, and for sa in case any other method of either TnyFolderStore, TnyAccount or TnyStoreAccount is used.

Note though that you must not use instances created by this constructor for either setting or getting members of the TnyAccount type. You must get the actual instances to read this from using either tny_combined_account_get_transport_account or tny_combined_account_get_store_account.

ta : A TnyTransportAccount instance
sa : a TnyStoreAccount instance
Returns : A new account instance that decorates both ta and sa

tny_combined_account_get_transport_account ()

TnyTransportAccount* tny_combined_account_get_transport_account
                                                        (TnyCombinedAccount *self);

Get the transport account that is being decorated by self. You must unreference the returned value if not needed anymore.

self : a TnyCombinedAccount instance
Returns : the transport account being decorated

tny_combined_account_get_store_account ()

TnyStoreAccount*    tny_combined_account_get_store_account
                                                        (TnyCombinedAccount *self);

Get the store account that is being decorated by self. You must unreference the returned value if not needed anymore.

self : a TnyCombinedAccount instance
Returns : the store account being decorated