[cups.development] notify-user-data question

Michael Sweet mike at easysw.com
Sat Jul 8 18:52:13 PDT 2006


Jerome Alet wrote:
> Hi there,
> 
> does someone have working client side C code which creates a subscription 
> containing something in the notify-user-data IPP attribute ? 
> 
> in particular, I don't really understand what "binary datas" means when
> reading the documentation : it seems that the '@' is considered 
> as being binary datas which need to be specially encoded 
> (hexadecimal between < and > brackets), and CUPS 1.2.x sources don't seem 
> to contain any client side code (or example) to create subscriptions
> with this attribute set.

For mailto notifications, the notify-user-data attribute contains an
email address.  For all other schemes, it is passed as-is.

Since it is an octetString attribute, you'll use ippAddOctetString()
to add the value; for mailto, use:

     ippAddOctetString(request, IPP_TAG_SUBSCRIPTION, "notify-user-data",
                       email, strlen(email));

The IPP notification specs are the definitive source of info on this.
Keep in mind the current 1.2.1 release doesn't handle everything
properly, but current trunk and 1.2.x code from the Subversion repo
does...

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups mailing list