Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
upnp controller
10-10-2014, 06:04 AM
Post: #1
upnp controller

i'm newbie in OhNet. I want control upnp renderer from window.i read the control point stack documentation but i don't know how to use these libraries from my project.
can any one guide me. sorry for my english if wrong
Find all posts by this user
10-10-2014, 09:37 AM
Post: #2
RE: upnp controller
Can you be more specific about what you are struggling with?

It might be easiest if you try writing a small program then post a detailed question, ideally with code, when you get stuck.

In case it helps, StackOverflow has some good advice on how to ask technical questions.
Find all posts by this user
10-10-2014, 09:54 AM
Post: #3
RE: upnp controller
Thanks for response.

PHP Code:
int main()
printf("Hello World!!!");

At first, i wanna print renderer and server list.
How to do the above scenario in OhNet?
Find all posts by this user
27-12-2014, 09:05 PM (This post was last modified: 27-12-2014 09:10 PM by ChriD.)
Post: #4
RE: upnp controller
This will help you for your first step

should look like this...
    OpenHome::Net::InitialisationParams*        initParams;
    std::vector<OpenHome::NetworkAdapter*>*        subnetList;
    TIpAddress                                    subnet
    OpenHome::Net::CpDeviceListCppUpnpAll* listAll;
    OpenHome::Net::FunctorCpDeviceCpp functorDeviceFound = OpenHome::Net::MakeFunctorCpDeviceCpp(*this, &YOURCLASS::DeviceFound);
    OpenHome::Net::FunctorCpDeviceCpp functorDeviceLost =  OpenHome::Net::MakeFunctorCpDeviceCpp(*this, &YOURCLASS::DeviceLost);

    initParams = OpenHome::Net::InitialisationParams::Create();
    subnetList = OpenHome::Net::UpnpLibrary::CreateSubnetList();
    subnet = (*subnetList)[0]->Subnet(); //<-- use first found network adapter (index = 0)    
    listAll = new OpenHome::Net::CpDeviceListCppUpnpAll(functorDeviceFound, functorDeviceLost);

void YOURCLASS::DeviceFound(OpenHome::Net::CpDeviceCpp& _device)

        std::string friendlyName, location;

        _device.GetAttribute("Upnp.Location", location);
        _device.GetAttribute("Upnp.FriendlyName", friendlyName);

// this will be called if a device is found...

void YOURCLASS::DeviceLost(OpenHome::Net::CpDeviceCpp& _device)

If you know how to Code c/c++ this will help you for sure.
Find all posts by this user

Forum Jump: