Calling base class methods

Sven Schwermer sven at svenschwermer.de
Wed Mar 9 14:27:24 UTC 2022


Hi,

On 3/9/22 15:12, Aleksander Morgado wrote:
> You don't invoke the original callback in parent_connect_ready. What
> you do in parent_connect_ready is to set as result of your own
> connect_3gpp implementation the result you received from the parent.
> We don't mix callbacks from different GTasks; actually, you don't even
> know if that "res" you received is a GTask or a GSimpleAsyncResult, so
> you just treat it as an opaque thing. What you do know is that if you
> call an async method passing a ready callback, your ready callback
> will be called with the operation is finished, and you should then run
> the corresponding async_finish() method to get the result of that
> operation. You're chainging async calls here, we don't merge them in
> any way.
> 

OK, thanks for the explanation. Do I then need to replicate the logic 
from the parent class connect_3gpp_ready callback including the logic 
from connect_succeeded? Or should I perhaps make connect_succeeded 
publicly available and call it from the derived class connect_3gpp_ready 
callback?

Best regards,
Sven


More information about the ModemManager-devel mailing list