Overriding frame_available method in a already existing profile.

Francis Brosnan Blázquez <[email protected]> 05 Dec 2002 11:59:44 +0100
Newsgroups gmane.network.beep.roadrunner.general
Organization Advanced Software Production Line, S.L.
Message-ID <[email protected]>
Hi.

I would like to override the frame_available method in an already
existing profile to get all message process funcionality out from the
profile code that I have made. I want to do this because I don't want to
have code in my shared library that will only be used by my server.

Well, before sending this mail I have test the following lines in my
server. It compiles, but when my server recieve a message, it continues
executing the old function that was set in the profile init.


RRProfileRegistry * perfil_beep;
RRChannelClass * clase_perfil_beep;
[...]

// I create my own profile
perfil_beep = rr_profile_registry_new ();
rr_profile_registry_add_profile (perfil_beep,TYPE_RULE_RR_PROFILE,NULL);

// I try to modify the frame_available callback.
clase_perfil_beep = RR_CHANNEL_GET_CLASS (perfil_beep);
clase_perfil_beep->frame_available = marco_disponible;  


I understand that last lines won't work because I'm modifing the class
but not the instance that is what I really want. How can I modify this?
Could I do this through RoadRunner or I need to learn how to do this
through GObject?

Thanks a lot.


-- 
Francis Brosnan Blázquez <[email protected]>
Advanced Software Production Line, S.L.