[Solved] Async Search and Query on contentDirectory C++
|
19-02-2015, 10:51 PM
(This post was last modified: 20-02-2015 05:39 PM by ChriD.)
Post: #1
|
|||
|
|||
[Solved] Async Search and Query on contentDirectory C++
Hi,
This one is a common question and has literaly nothng to do with the OhNetStack i think. In C# i can use Lamdas to add extra information for an async method eg. Code: contentDirectory.Browse(..., (asyncHandle) => OnBrowseEnd(asyncHandle, 1)); How can i do this in C++ with the OhNet AsyncFunctor? Code: OpenHome::Net::FunctorAsync functor = OpenHome::Net::MakeFunctorAsync(*this, &MediaServer::OnBrowseEnd); best regards Chris |
|||
20-02-2015, 09:12 AM
Post: #2
|
|||
|
|||
RE: Async Search and Query on contentDirectory C++
It isn't possible to use lambdas in place of FunctorAsync I'm afraid. While I do understand the attraction of this, it's unlikely we'll support this soon. Use of lambdas requires a compiler with support for C++11 - some clients of ohNet run on NASes that use relatively old versions of Linux whose compilers do not support C++11.
|
|||
20-02-2015, 05:34 PM
(This post was last modified: 20-02-2015 05:58 PM by ChriD.)
Post: #3
|
|||
|
|||
RE: Async Search and Query on contentDirectory C++
Okay
![]() So there is no chance to know which async method triggered the callback? Not any async handler id or something like that? Would be nice, but all in all no problem. I can solve my Problem by using threads and call the sync method and make my own callbacks |
|||
« Next Oldest | Next Newest »
|