WTVP/Processes/Favorites

From WebTV Wiki
Revision as of 20:49, 10 August 2023 by Wtv-411 (talk | contribs) (→‎Adding favorites: Start writing documentation on favorite add service)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
WTVP
OverviewList of WTVP ServicesWTVP-specific Content-TypesStatus Codes
Concepts
TokensTicketsCapability Flags
Headers
Header ListData TypesCommon Request Headers
Processes
First-Time RegistrationHeadwaiter (Login)Messenger ServicesFavoritesChecking for new mailRetrieving settingsObtaining new wtv-ticketsSmart CardMiscellaneous
URLs for WTVP Services
wtv-1800wtv-aroundtownwtv-authorwtv-centerwtv-chatwtv-contentwtv-cookiewtv-customscriptwtv-diskwtv-epguidewtv-favoritewtv-flashromwtv-guidewtv-head-waiterwtv-homewtv-introwtv-logwtv-mailwtv-newswtv-noticeswtv-partnerwtv-passportwtv-registerwtv-setupwtv-smartcardwtv-spotwtv-starwtv-trickswtv-tutorial

Folder list

When a WebTV/MSN TV client has to retrieve the list of favorite folders for the current user, it will make a WTVP GET request to the service URL defined in the wtv-favorites-folders-url header from the final headwaiter response. The service the URL points to is usually hosted on wtv-favorite, and the service URL used by the original service was wtv-favorite:/list-folders.

The response for the folder list service has a Content-Type of text/html, but the body data is a NUL-terminated sequence of strings representing the names of the favorite folders on the current user's account.

200 OK\n
Connection: Keep-Alive\n
wtv-encrypted: true\n
wtv-lzpf: 0\n
Content-length: {length of body}\n
Content-type: text/html\n
\n
Personal[0x00]Recommended[0x00]

Adding favorites

WebTV and MSN TV have a panel for adding a site as a favorite to a designated favorite folder, which can be opened by selecting the "Save" button from the Options panel. When a user adds a site as a favorite, the client will make a POST request to the service URL wtv-favorite:/add, which sends a query string of the information for the favorite and which folder to put it in, along with an image type for the thumbnail. The thumbnail data is sent in the body.

POST wtv-favorite:/add?favorite-category=Favorite+Folder+Name&favorite-title=Website+Title&favorite-thumbnail-type=image/wtv-bitmap&favorite-url=wtv-home%3A%2Fhome\r\n
wtv-system-cpuspeed: 166164662\r\n
wtv-system-sysconfig: 3116068\r\n
wtv-disk-size: 8006\r\n
wtv-incarnation: 32\r\n
Content-type: application/x-www-form-urlencoded\r\n
Content-length: {length of thumbnail data}\r\n
\r\n

TODO: Write up how favorite service works server-side

Parameters

Parameter Description
favorite-category The name of the favorite folder (category) to add the favorite to
favorite-name The name for the favorite (usually the page title)
favorite-thumbnail-type The file type for the favorite thumbnail to upload for the favorite. Currently, the only known value sent is image/wtv-bitmap
favorite-url URL for the favorite to point to. This can be a service URL or a normal website URL