From 79889fefe62fddfe26badfbacb780cd2a8678308 Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Sat, 25 Sep 2004 07:23:17 +0000 Subject: [PATCH] - Added tag support in the markup section. - Detailed what markup is and what it is not, and its restrictions. - Removed the High urgency level. - Gave a better categorization to notification type formats. - Added new notification types. - Fixed notification expiration so it's a timeout rather than a timestamp. --- docs/ChangeLog | 11 + docs/notification-spec.xml | 408 ++++++++++++++++++++++++++++++------- 2 files changed, 342 insertions(+), 77 deletions(-) diff --git a/docs/ChangeLog b/docs/ChangeLog index 4b813de..533931d 100644 --- a/docs/ChangeLog +++ b/docs/ChangeLog @@ -1,3 +1,14 @@ +Sat Sep 25 00:08:45 PDT 2004 Christian Hammond + + * notification-spec.xml: + - Added tag support in the markup section. + - Detailed what markup is and what it is not, and its restrictions. + - Removed the High urgency level. + - Gave a better categorization to notification type formats. + - Added new notification types. + - Fixed notification expiration so it's a timeout rather than a + timestamp. + Fri Sep 03 22:26:31 PDT 2004 Christian Hammond * notification-spec.xml: diff --git a/docs/notification-spec.xml b/docs/notification-spec.xml index afd9a26..45062fd 100644 --- a/docs/notification-spec.xml +++ b/docs/notification-spec.xml @@ -7,7 +7,7 @@ Desktop Notifications Specification Version 0.3 - 28 August 2004 + 15 September 2004 Mike @@ -29,9 +29,20 @@ + 0.3 - 28 August 2004 + 15 September 2004 cdh Added hint and notification type sections @@ -169,11 +180,11 @@ implementations are free to word wrap them as they see fit. - The text may contain simple markup as specified in + The body may contain simple markup as specified in . It must be encoded using UTF-8. - If the body is omitted just the summary is displayed. + If the body is omitted, just the summary is displayed. @@ -198,12 +209,21 @@ See . - Expiration Time + Expires - The timestamp in seconds since the epoch that the notification should - close. For example, if one wishes to have an expiration of 5 seconds - from now, they must grab the current timestamp and add 5 seconds to it. + A boolean flag indicating whether or not this notification should + automatically expire. + + + + + Expiration Timeout + + + The timeout time in seconds since the display of the notification at + which the notification should automatically close. This is ignored + if the expires flag is set to false. If zero, the notification's expiration time is dependent on the @@ -215,7 +235,6 @@ - Each notification displayed is allocated a unique ID by the server. This is unique within the session. While the notification server is @@ -223,7 +242,7 @@ exceeded. - This can be used to hide the notification before the expiration time + This can be used to hide the notification before the expiration timeout is reached. It can also be used to atomically replace the notification with another. This allows you to (for instance) modify the contents of a notification while it's on-screen. @@ -291,24 +310,83 @@ Hyperlink + + + img src="..." alt="..." + + Image + - - What else do we want here? We're going to want more tags - for sure. - + A full-blown HTML implementation is not required of this spec, and + notifications should never take advantage of tags that are not listed + above. As notifications are not a substitute for web browsers or complex + dialogs, advanced layout is not necessary, and may in fact limit the + number of systems that notification services can run on, due to memory + usage and screen space. Such examples are PDAs, certain cell phones, and + slow PCs or laptops with little memory. + + For the same reason, a full XML or XHTML implementation using XSLT or + CSS stylesheets is not part of this specification. Information that + must be presented in a more complex form should use an application-specific + dialog, a web browser, or some other display mechanism. + + + The tags specified above mark up the content in a way that allows them + to be stripped out on some implementations without impacting the actual + content. + + + + Hyperlinks + + Hyperlinks allow for linking one or more words to a URI. There is no + requirement to allow for images to be linked, and it is highly suggested + that implementations do not allow this, as there is no clean-looking, + standard visual indicator for a hyperlinked image. + + + Hyperlinked text should appear in the standard blue underline format. + + + Hyperlinks cannot function as a replacement for actions. They are + used to link to local directories or remote sites using standard URI + schemes. + + + Implementations are not required to support hyperlinks. + + + + + Images + + Images may be placed in the notification, but this should be done with + caution. The image should never exceed 200x100, but this should be thought + of as a maximum size. Images should always have alternative text + provided through the alt="..." attribute. + + + Image data cannot be embedded in the message itself. Images referenced + must always be local files. + + + Implementations are not required to support images. + + Icons - A notification can optionally include an array of images. The array of - images specifies frames in an animation, which always loop. - Implementations are free to ignore the images data, and implementations - that support images need not support animation. + A notification can optionally include an array of images for use as an + icon representing the notification. The array of images specifies frames + in an animation, which always loop. Implementations are free to ignore the + images data, and implementations that support images need not support + animation. If the image array has more than one element, a "primary frame" can @@ -367,16 +445,170 @@ Notification Types - + Notifications can optionally have a type indicator. Although neither + client or nor server must support this, some may choose to. Those servers + implementing notification types may use them to intelligently display + the notification in a certain way, or group notifications of similar + types. + + Notification types are in + class.specific form. + class specifies the generic type of notification, and + specific specifies the more specific type of + notification. + + + If a specific type of notification does not exist for your notification, + but the generic kind does, a notification of type + class is acceptable. + + + Third parties, when defining their own notification types, should discuss + the possibility of standardizing on the hint with other parties, preferably + in a place such as the + xdg + mailing list at + freedesktop.org. If it + warrants a standard, it will be added to the table above. If no + consensus is reached, the notification type should be in the form of + "x-vendor.class.name." + + + The following table lists standard notifications as defined by this spec. + More will be added in time. + + + Notification Types + + + + Type + Description + + + + + "device" + + A generic device-related notification that doesn't fit into + any other category. + + + + "device.added" + A device, such as a USB device, was added to the system. + + + "device.error" + A device had some kind of error. + + + "device.removed" + + A device, such as a USB device, was removed from the system. + + + + "email" + + A generic e-mail-related notification that doesn't fit into any + other category. + + + + "email.arrived" + A new e-mail notification. + + + "email.bounced" + A notification stating that an e-mail has bounced. + + + "im" + + A generic instant message-related notification that doesn't fit + into any other category. + + + + "im.error" + An instant message error notification. + + + "im.received" + A received instant message notification. + + + "network" + + A generic network notification that doesn't fit into any other + category. + + + + "network.connected" + + A network connection notification, such as successful sign-on to a + network service. This should not be confused with + device.added for new network devices. + + + + "network.disconnected" + + A network disconnected notification. This should not be confused with + device.removed for disconnected network devices. + + + + "network.error" + + A network-related or connection-related error. + + + + "presence" + + A generic presence change notification that doesn't fit into + any other category, such as going away or idle. + + + + "presence.offline" + An offline presence change notification. + + + "presence.online" + An online presence change notification. + + + "transfer" + + A generic file transfer or download notification that doesn't fit + into any other category. + + + + "transfer.complete" + A file transfer or download complete notification. + + + "transfer.error" + A file transfer or download error. + + + +
Urgency Levels Notifications have an urgency level associated with them. This defines - the importance of the notification. For example, "Your computer is on - fire" would be a critical urgency. "Joe Bob signed on" would be a low + the importance of the notification. For example, "Joe Bob signed on" + would be a low urgency. "You have new mail" or "A USB device was unplugged" + would be a normal urgency. "Your computer is on fire" would be a critical urgency. Urgency levels are defined as follows: @@ -385,8 +617,8 @@ - Level - Name + Type + Description @@ -396,14 +628,10 @@ 1 - Medium (Normal) + Normal 2 - High - - - 3 Critical @@ -416,10 +644,15 @@ them.
- For the most part, server implementations may use urgency information - how they see fit. The one exception is the Critical notification. - As Critical notifications are things that the user will most likely want - to know about, they should not be closed until the user dismisses them. + For low and normal urgencies, server implementations may display the + notifications how they choose. They should, however, have a sane + expiration timeout dependent on the urgency level. + + + Critical notifications should not automatically expire, as they are + things that the user will most likely want to know about. They should + only be closed when the user dismisses them, for example, by clicking on + the notification.
@@ -427,15 +660,24 @@ Hints Hints are a way to provide extra data to a notification server that - the server may be able to make use of. One such example would be the - window ID. + the server may be able to make use of. Neither clients nor notification servers are required to support any hints. Both sides should assume that hints are not passed, and should ignore any hints they do not understand. - - - Third parties, when defining their own hints, should discuss the - possibility of standardizing on the hint with other parties, preferably - in a place such as the - xdg - mailing list at - freedesktop.org. If it - warrants a standard, it will be added to the table above. If no - consensus is reached, the hint name should be in the form of - "x-vendor-name." - @@ -509,6 +738,14 @@ Server Capabilities + + "actions" + + The server will provide the specified actions to the user. Even if + this cap is missing, actions may still be specified by the client, + however the server is free to ignore them. + + "body" @@ -517,7 +754,19 @@ - "markup" + "body-hyperlinks" + + The server supports hyperlinks in the notifications. + + + + "body-images" + + The server supports images in the notifications. + + + + "body-markup" Supports markup in the body text. If marked up text is sent to a server that does not give this cap, the markup will show @@ -525,29 +774,21 @@ - "static-image" - - Supports display of exactly 1 frame of any given image array. - This value is mutually exclusive with - "multi-image", it is a protocol error for the - server to specify both. - - - - "multi-image" + "icon-multi" The server will render an animation of all the frames in a given image array. The client may still specify multiple frames even if - this cap and/or static-image is missing, however the server is - free to ignore them and use only the primary frame. + this cap and/or "icon-static" is missing, however + the server is free to ignore them and use only the primary frame. - "actions" + "icon-static" - The server will provide the specified actions to the user. Even if - this cap is missing, actions may still be specified by the client, - however the server is free to ignore them. + Supports display of exactly 1 frame of any given image array. + This value is mutually exclusive with + "icon-multi", it is a protocol error for the + server to specify both. @@ -579,7 +820,8 @@ ARRAY images DICT_OR_NIL actions DICT_OR_NIL hints - UINT32_OR_NIL expire_time + BOOL expires + UINT32 expire_timeout @@ -674,15 +916,27 @@ - expire_time - UINT32 or NIL + expires + BOOL - The notification time-out time, represented as UNIX-time (seconds - since the epoch). If this is NIL, the notification - will never time out, and will only be closed when an action is - invoked. If non-NIL, this will specify a time at which the notification - will be automatically closed. If zero, the server's default - expiration time will be used. + A boolean flag indicating whether or not this notification should + automatically expire. + + + + expire_timeout + UINT32 + + + The timeout time in seconds since the display of the notification at + which the notification should automatically close. This is ignored + if the expires flag is set to false. + + + If zero, the notification's expiration time is dependent on the + notification server's settings, and may vary for the type of + notification. +