Re: [Evolution-hackers] [Camel] How can I get a reference to the store class from another class?



On Mon, 2005-10-10 at 18:55 +0800, Not Zed wrote:
> Note that it is getting a completely new object.
> 
> It's private peeking is 'ok' since it shares that private knowledge.  It
> doesn't make it good though.
> 
> > ######## snip #######
> > 	CamelStore *store = NULL;
> > 	CamelGroupwiseStorePrivate *priv = NULL;
> > 	CamelService *service = CAMEL_SERVICE(transport);
> > 
> >         < snip >
> > 
> > 	store = camel_session_get_store (service->session, url, ex );
> > 	groupwise_store = CAMEL_GROUPWISE_STORE (store);
> > 	priv = groupwise_store->priv;
> > ######## snip #######
> > 
> > The transport should be able to invoke overloaded store methods, such as
> > connect(), on this reference, right?
> 
> They can invoke any of the PUBLIC ENTRY POINTS, yes.
> 
> But you can't call store.parent_class.connect(on the transport), since
> they are not the same object.

Hmm... Feeling a bit dense here :-( 

The "priv" member above is initialized by the in-memory Groupwise store
object, right?


Thanks,
  jules





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]