Re: Need Help in using gupnp_device_info_get_icon_url



You're on your own here. You have to parse the response, build the url
from iconList content and then download it somehow. The code in GUPnP
only handles service description files.

Hi,
 
   Thank you for the help , I would also like to know how to get the
icons for applications which services are hosting through gupnp, the
scenario is as below ,
 
1. Client uses gupnp_device_info_get_icon_url() to get the device
icon.
2. Client request for the service types on the server.
3. Client connects to the services of the device , where services will
have applications hosted (like calender , browser , gallery etc) on
them , every applications will have application ID and icon list ,
like below example , which client will get after invoking getlist
action.

    <app>
                <appID>0x68</appID>
                <name>Internet</name>
                <description>Internet browser</description>
                <variant>browser</variant>
                <providerName>google</providerName>
                <providerName>browser fill up provider url
</providerName>
                <appCertificateURL>browser fill up</appCertificateURL>
                <iconList>
                        <icon>
                                <mimetype>image/png</mimetype>
                                <width>120</width>
                                <height>120</height>
                                <depth>32</depth>
                                <url>/browser.png</url>
                        </icon>
                </iconList>
              ----
              -----
        </app>
 4. Now in client we need to get the application icons from server ,
now we will be service_available_proxy .
 
How to get the application icons from server applications which are
hosted by server services?
 
Thanks & Regards,
Badri

On Tue, Oct 1, 2013 at 1:38 PM, Jens Georg <mail jensge org> wrote:
        On Di, 2013-10-01 at 10:58 +0300, Jussi Kukkonen wrote:
        > On 1 October 2013 07:54, badrichandi gmail com
        <badrichandi gmail com> wrote:
        > > , from client I am  trying to get this icon using api ,
        > > gupnp_device_info_get_icon_url()
        > > when I run my client code I am able to see the
        > > http://localhost:port/image.png getting displayed. But I
        need to save this
        > > png file , as per the gupnp_device_info_get_icon_url api
        help , I could see
        > > the char** mimetype :  The location where to store the the
        format of the
        > > returned icon , so I used it in following way ,
        > >
        > > a =
        > >
        gupnp_device_info_get_icon_url(info,"image/png",32,120,120,1,&b,&m,&y,&c);
        > >
        > > where b is a char* string having the path (where to store
        the png).
        >
        > No, a is the url of the icon. b is the mimetype. The
        documentation
        > could be clearer but this is what it tries to say.
        
        
        Here's some example code that uses libsoup to download the
        icon and
        store it in a file:
        
        https://github.com/phako/korva/blob/master/server/upnp/korva-upnp-device.c#L647
        
        





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]