Csenteri Barna


I have a problem with the extended content - to take one existing example let's take the Email gadget shipped with Vista.

That one sends different content like image, content xml or a menu with different id's. The images are coming with id=5000+, the menu with id=500+ and the normal content from 1+.

My question would be: from where I should know that a content is for sure an image, or for sure a content or a menu The REFENDPOINT_ID coming in the OnAddContent decides this Or there is no such a difference and the driver should always start from id=1 and the xml decides if a data is an image (image tag) or a menu (menu tag)



Re: Windows SideShow Development Extended content in Sideshow driver?


The driver itself does not usually do anything with the content.

The driver is simply a mechanism for moving content from the framework to the driver. The content ID's are defined solely by the gadget and cannot be altered by the driver. Therefore it is entirely upto the gadget to decide what ID's to use for any content type.

The REFENDPOINT_ID does not change or specify the content type. It specifies that the content is either SCF, iCalendar or anything other endpoint. Since SCF could be XML, Text or images the endpoint ID does not help in deciphering the content.

As a helper:

  • Content ID 0 is always Glance
  • Content starting with "<body" is either Content, Menu or Dialog (must be UTF-8 as defined by the SideShow spec)
  • Everything else can be a Bitmap.

This is only a starting point but can be easily refined.

Re: Windows SideShow Development Extended content in Sideshow driver?

Csenteri Barna


Unfortunatelly that's what I found in the documentation too, but I wanted to be sure.

I expected to have a flag in the id at least or something which would tell what the heck is what I've got Smile

Unfortunatelly I need more than the glance content because a lot of gadgets are sending their usable info in the first page or other pages (Feed viewer for example). But with a simple text LCD the bitmap and menu content cannot be displayed so I would like to filter it from the start and not even cache it (just an ID and an errorcode).

But I guess I have to work with what I have and forget what I can't have Smile

Thanks for the answer,


Re: Windows SideShow Development Extended content in Sideshow driver?

Dan Polivy - MSFT


This is a common complaint I hear, and I understand your perspective. To give a little context from the other side: when we were designing the SCF endpoint (and SideShow in general), we assumed devices were more likely to cache the content, and then fetch/render it on demand. In this context, it is fairly easy to determine what each piece of content is: you start at rendering content ID 1 (which is always XML), and then as the user navigates the content, based on how the ID is used from the current page, you know how to interpret the data with the specified ID. For example, if content ID 1 is a menu with taget IDs and image IDs for each item, you know the target ID references XML (or at least it should!), and the image ID references an image.

Unfortunately, this model doesn't really work as well when you try and parse all the content upfront Smile If possible, try and at least start from ID 1 and parse the tree that way; otherwise, you can always just look for the <body> tag or other image headers to determine the content type. Not elegant, but it should work.