EldoS | Feel safer!

Software components for data protection, secure storage and transfer

how to pass data to the callbacks (events)

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 10/11/2013 03:35:39
by Youssouf SAKO (Basic support level)
Joined: 10/08/2013
Posts: 12


I have implemented a class "Disk". Each Disk has his own thread. Now my problem is that I don't know how to pass the data of the class "Disk" to the callbacks (events). The callbacks implementation is static therefore they can't acces to the Disk data. Is there a way to pass a pointer of the class to the callbacks?

Posted: 10/11/2013 03:45:04
by Eugene Mayevski (EldoS Corp.)

You are receiving a reference to the CallbackFileSystem instance as the first parameter of the event. CallbackFileSystem class has Tag property in which you can store something like a reference to your class or some other data.

Sincerely yours
Eugene Mayevski
Posted: 10/11/2013 03:57:59
by Youssouf SAKO (Basic support level)
Joined: 10/08/2013
Posts: 12

OK! Thank you.




Topic viewed 579 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!