discovery-api/Overview.html
author Rich Tibbett <richt@opera.com>
Wed, 27 Mar 2013 06:27:35 +0100
changeset 402 a3626e492d27
parent 392 38bf34c08d76
child 437 d25229263a68
permissions -rw-r--r--
Add WD (29th March 2013) for Network Service Discovery API
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
     1
<!DOCTYPE html>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
     2
<html lang="en" dir="ltr">
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
     3
<head>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
     4
    <title>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
     5
      Network Service Discovery
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
     6
    </title>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
     7
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
     8
238
65e14f8dc95d Editorial changes to Service Discovery spec
Rich Tibbett <richt@opera.com>
parents: 232
diff changeset
     9
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    10
    <style>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    11
     /* Custom ReSpec CSS (by Rich Tibbett) */
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    12
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    13
     /* Add better spacing to sections */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    14
     section, .section { margin-bottom: 2em; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    15
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    16
     /* Reduce note & issue render size */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    17
     .note, .issue { font-size:0.8em; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    18
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    19
     /* Add addition spacing to <ol> and <ul> for rule definition */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    20
     ol.rule li, ul.rule li { padding:0.6em; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    21
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    22
     pre.widl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; position: relative; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    23
     pre.widl :link, pre.widl :visited { color: #000; background: transparent; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    24
     pre.widl:before { content: "IDL"; font: bold small sans-serif; padding: 0.5em; background: white; position: absolute; top: 0; margin: -1px 0 0 -4em; width: 1.5em; border: thin solid; border-radius: 0 0 0 0.5em }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    25
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    26
     div.example { border: solid thin black; background: #FFFFF0; color: black; padding: 0.5em 1em; position: relative; margin: 1em 0 1em 4.6em; width: auto; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    27
     div.example:before { content: "EXAMPLE"; font: bold small sans-serif; padding: 0.5em; background: white; color: black; position: absolute; top: 0; margin: -1px 0 0 -7.6em; width: 5em; border: thin solid black; border-radius: 0 0 0 0.5em }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    28
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    29
     dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    30
     hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    31
     dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    32
     dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    33
     dl.domintro dd p { margin: 0.5em 0; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    34
     dl.domintro code {font-size: inherit; font-style: italic; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    35
     dl.domintro:before { display: table; margin: -1em -0.5em 0.5em auto; width: auto; content: 'This box is non-normative. Implementation requirements are given below this box.'; color: red; border: solid 2px; background: white; padding: 0 0.25em; font-size:0.8em; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    36
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    37
     table { border-collapse:collapse; border-style:hidden hidden none hidden }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    38
     table thead { border-bottom:solid }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    39
     table tbody th:first-child { border-left:solid }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    40
     table td, table th { border-left:solid; border-right:solid; border-bottom:solid thin; vertical-align:top; padding:0.2em }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    41
     </style>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    42
  <style>/*****************************************************************
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    43
 * ReSpec 3 CSS
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    44
 * Robin Berjon - http://berjon.com/
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    45
 *****************************************************************/
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    46
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    47
/* --- INLINES --- */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    48
em.rfc2119 {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    49
    text-transform:     lowercase;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    50
    font-variant:       small-caps;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    51
    font-style:         normal;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    52
    color:              #900;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    53
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    54
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    55
h1 acronym, h2 acronym, h3 acronym, h4 acronym, h5 acronym, h6 acronym, a acronym,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    56
h1 abbr, h2 abbr, h3 abbr, h4 abbr, h5 abbr, h6 abbr, a abbr {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    57
    border: none;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    58
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    59
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    60
dfn {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    61
    font-weight:    bold;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    62
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    63
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    64
a.internalDFN {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    65
    color:  inherit;
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
    66
    border-bottom:  1px solid #99c;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    67
    text-decoration:    none;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    68
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    69
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    70
a.externalDFN {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    71
    color:  inherit;
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
    72
    border-bottom:  1px dotted #ccc;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    73
    text-decoration:    none;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    74
}
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
    75
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    76
a.bibref {
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    77
    text-decoration:    none;
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    78
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    79
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    80
cite .bibref {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
    81
    font-style: normal;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    82
}
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
    83
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    84
code {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    85
    color:  #ff4500;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    86
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    87
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    88
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    89
/* --- --- */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    90
ol.algorithm { counter-reset:numsection; list-style-type: none; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    91
ol.algorithm li { margin: 0.5em 0; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    92
ol.algorithm li:before { font-weight: bold; counter-increment: numsection; content: counters(numsection, ".") ") "; }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    93
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    94
/* --- TOC --- */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    95
.toc a, .tof a {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    96
    text-decoration:    none;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    97
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
    98
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
    99
a .secno, a .figno {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   100
    color:  #000;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   101
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   102
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   103
ul.tof, ol.tof {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   104
    list-style: none outside none;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   105
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   106
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   107
.caption {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   108
    margin-top: 0.5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   109
    font-style:   italic;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   110
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   111
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   112
/* --- TABLE --- */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   113
table.simple {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   114
    border-spacing: 0;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   115
    border-collapse:    collapse;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   116
    border-bottom:  3px solid #005a9c;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   117
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   118
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   119
.simple th {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   120
    background: #005a9c;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   121
    color:  #fff;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   122
    padding:    3px 5px;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   123
    text-align: left;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   124
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   125
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   126
.simple th[scope="row"] {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   127
    background: inherit;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   128
    color:  inherit;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   129
    border-top: 1px solid #ddd;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   130
}
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   131
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   132
.simple td {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   133
    padding:    3px 10px;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   134
    border-top: 1px solid #ddd;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   135
}
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   136
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   137
.simple tr:nth-child(even) {
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   138
    background: #f0f6ff;
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   139
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   140
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   141
/* --- DL --- */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   142
.section dd > p:first-child {
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   143
    margin-top: 0;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   144
}
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   145
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   146
.section dd > p:last-child {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   147
    margin-bottom: 0;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   148
}
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   149
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   150
.section dd {
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   151
    margin-bottom:  1em;
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   152
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   153
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   154
.section dl.attrs dd, .section dl.eldef dd {
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   155
    margin-bottom:  0;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   156
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   157
</style><style>/* --- ISSUES/NOTES --- */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   158
div.issue-title, div.note-title {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   159
    padding-right:  1em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   160
    min-width: 7.5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   161
    color: #b9ab2d;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   162
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   163
div.issue-title { color: #e05252; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   164
div.note-title { color: #52e052; }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   165
div.issue-title span, div.note-title span {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   166
    text-transform: uppercase;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   167
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   168
div.note, div.issue {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   169
    margin-top: 1em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   170
    margin-bottom: 1em;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   171
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   172
.note > p:first-child, .issue > p:first-child { margin-top: 0 }
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   173
.issue, .note {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   174
    padding: .5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   175
    border-left-width: .5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   176
    border-left-style: solid;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   177
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   178
div.issue, div.note {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   179
    padding: 0.5em;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   180
    margin: 1em 0;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   181
    position: relative;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   182
    clear: both;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   183
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   184
span.note, span.issue { padding: .1em .5em .15em; }
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   185
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   186
.issue {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   187
    border-color: #e05252;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   188
    background: #fbe9e9;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   189
}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   190
.note {
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   191
    border-color: #52e052;
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   192
    background: #e9fbe9;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   193
}
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   194
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   195
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   196
</style><style>/* HIGHLIGHTS */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   197
code.prettyprint {
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   198
    color:  inherit;
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   199
}
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   200
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   201
/* this from google-code-prettify */
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   202
.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   203
</style><link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel="stylesheet"><!--[if lt IE 9]><script src='http://www.w3.org/2008/site/js/html5shiv.js'></script><![endif]--></head>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   204
  <body><div class="head">
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   205
  <p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   206
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   207
      <a href="http://www.w3.org/"><img src="http://www.w3.org/Icons/w3c_home" alt="W3C" height="48" width="72"></a>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   208
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   209
  </p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   210
  <h1 class="title" id="title">Network Service Discovery</h1>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   211
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   212
  <h2 id="w3c-editor-s-draft-27-march-2013"><abbr title="World Wide Web Consortium">W3C</abbr> Editor's Draft 27 March 2013</h2>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   213
  <dl>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   214
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   215
      <dt>This version:</dt>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   216
      <dd><a href="http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html">http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html</a></dd>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   217
      <dt>Latest published version:</dt>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   218
      <dd><a href="http://www.w3.org/TR/discovery-api/">http://www.w3.org/TR/discovery-api/</a></dd>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   219
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   220
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   221
      <dt>Latest editor's draft:</dt>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   222
      <dd><a href="http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html">http://dvcs.w3.org/hg/dap/raw-file/tip/discovery-api/Overview.html</a></dd>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   223
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   224
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   225
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   226
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   227
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   228
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   229
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   230
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   231
    <dt>Editors:</dt>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   232
    <dd><span>Rich Tibbett</span>, <a href="http://opera.com/">Opera Software ASA</a></dd>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   233
<dd><span>Clarke Stevens</span>, <a href="http://cablelabs.com/">CableLabs</a></dd>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   234
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   235
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   236
  </dl>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   237
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   238
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   239
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   240
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   241
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   242
      <p class="copyright">
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   243
        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> ©
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   244
        2013
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   245
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   246
        <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   247
        (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   248
        <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   249
        <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   250
        <abbr title="World Wide Web Consortium">W3C</abbr> <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   251
        <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   252
        <a href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a> rules apply.
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   253
      </p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   254
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   255
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   256
  <hr>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   257
</div>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   258
    <section class="introductory" id="abstract"><h2>Abstract</h2>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   259
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   260
        This specification defines a mechanism for an HTML document to discover and subsequently communicate with
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   261
        <abbr title="Hypertext Transfer Protocol">HTTP</abbr>-based services advertised via common discovery protocols
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   262
        within the current network.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   263
      </p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   264
    </section><section id="sotd" class="introductory"><h2>Status of This Document</h2>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   265
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   266
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   267
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   268
        <p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   269
          <em>This section describes the status of this document at the time of its publication. Other
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   270
          documents may supersede this document. A list of current <abbr title="World Wide Web Consortium">W3C</abbr> publications and the latest revision
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   271
          of this technical report can be found in the <a href="http://www.w3.org/TR/"><abbr title="World Wide Web Consortium">W3C</abbr> technical reports
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   272
          index</a> at http://www.w3.org/TR/.</em>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   273
        </p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   274
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   275
      <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   276
        This document represents the early consensus of the group on the scope and features of the proposed <abbr title="Application Programming Interface">API</abbr>.
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   277
      </p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   278
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   279
        <p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   280
          This document was published by the <a href="http://www.w3.org/2009/dap/">Device APIs Working Group</a> as an Editor's Draft.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   281
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   282
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   283
          If you wish to make comments regarding this document, please send them to
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   284
          <a href="mailto:public-device-apis@w3.org">public-device-apis@w3.org</a>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   285
          (<a href="mailto:public-device-apis-request@w3.org?subject=subscribe">subscribe</a>,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   286
          <a href="http://lists.w3.org/Archives/Public/public-device-apis/">archives</a>).
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   287
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   288
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   289
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   290
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   291
        All comments are welcome.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   292
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   293
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   294
          </p><p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   295
            Publication as an Editor's Draft does not imply endorsement by the <abbr title="World Wide Web Consortium">W3C</abbr> Membership.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   296
            This is a draft document and may be updated, replaced or obsoleted by other documents at
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   297
            any time. It is inappropriate to cite this document as other than work in progress.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   298
          </p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   299
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   300
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   301
        <p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   302
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   303
            This document was produced by a group operating under the
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   304
            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February 2004 <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   305
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   306
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   307
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   308
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   309
              <abbr title="World Wide Web Consortium">W3C</abbr> maintains a <a href="http://www.w3.org/2004/01/pp-impl/43696/status" rel="disclosure">public list of any patent disclosures</a>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   310
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   311
            made in connection with the deliverables of the group; that page also includes instructions for
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   312
            disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   313
            <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential Claim(s)</a> must disclose the
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   314
            information in accordance with <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   315
            6 of the <abbr title="World Wide Web Consortium">W3C</abbr> Patent Policy</a>.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   316
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   317
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   318
        </p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   319
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   320
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   321
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   322
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   323
</section><section id="toc"><h2 class="introductory">Table of Contents</h2><ul class="toc"><li class="tocline"><a class="tocxref" href="#introduction"><span class="secno">1. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   324
        Introduction
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   325
      </a></li><li class="tocline"><a class="tocxref" href="#conformance"><span class="secno">2. </span>Conformance</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#dependencies"><span class="secno">2.1 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   326
          Dependencies
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   327
        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#terminology"><span class="secno">3. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   328
        Terminology
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   329
      </a></li><li class="tocline"><a class="tocxref" href="#requesting-networked-services"><span class="secno">4. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   330
        Requesting networked services
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   331
      </a><ul class="toc"><li class="tocline"><a class="tocxref" href="#methods"><span class="secno">4.1 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   332
          Methods
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   333
        </a></li><li class="tocline"><a class="tocxref" href="#error-handling"><span class="secno">4.2 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   334
          Error Handling
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   335
        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#obtaining-networked-services"><span class="secno">5. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   336
        Obtaining networked services
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   337
      </a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes"><span class="secno">5.1 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   338
          Attributes
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   339
        </a></li><li class="tocline"><a class="tocxref" href="#methods-1"><span class="secno">5.2 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   340
          Methods
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   341
        </a></li><li class="tocline"><a class="tocxref" href="#events"><span class="secno">5.3 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   342
          Events
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   343
        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#communicating-with-a-networked-service"><span class="secno">6. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   344
        Communicating with a networked service
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   345
      </a><ul class="toc"><li class="tocline"><a class="tocxref" href="#attributes-1"><span class="secno">6.1 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   346
          Attributes
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   347
        </a></li><li class="tocline"><a class="tocxref" href="#states"><span class="secno">6.2 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   348
          States
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   349
        </a></li><li class="tocline"><a class="tocxref" href="#events-1"><span class="secno">6.3 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   350
          Events
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   351
        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#service-discovery"><span class="secno">7. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   352
        Service Discovery
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   353
      </a><ul class="toc"><li class="tocline"><a class="tocxref" href="#zeroconf-mdns-dns-sd"><span class="secno">7.1 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   354
          Zeroconf (<abbr title="Multicast DNS">mDNS</abbr> + <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr>)
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   355
        </a></li><li class="tocline"><a class="tocxref" href="#simple-service-discovery-protocol-ssdp"><span class="secno">7.2 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   356
          Simple Service Discovery Protocol (<abbr title="Simple Service Discovery Protocol">SSDP</abbr>)
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   357
        </a></li><li class="tocline"><a class="tocxref" href="#discovery-and-launch-protocol-dial"><span class="secno">7.3 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   358
          Discovery and Launch Protocol (<abbr title="Discovery and Launch Protocol">DIAL</abbr>)
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   359
        </a></li><li class="tocline"><a class="tocxref" href="#network-topology-monitoring"><span class="secno">7.4 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   360
          Network Topology Monitoring
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   361
        </a></li></ul></li><li class="tocline"><a class="tocxref" href="#events-summary"><span class="secno">8. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   362
        Events Summary
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   363
      </a></li><li class="tocline"><a class="tocxref" href="#garbage-collection"><span class="secno">9. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   364
        Garbage collection
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   365
      </a></li><li class="tocline"><a class="tocxref" href="#use-cases-and-requirements"><span class="secno">10. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   366
        Use Cases and Requirements
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   367
      </a></li><li class="tocline"><a class="tocxref" href="#examples"><span class="secno">A. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   368
        Examples
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   369
      </a></li><li class="tocline"><a class="tocxref" href="#acknowledgements"><span class="secno">B. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   370
        Acknowledgements
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   371
      </a></li><li class="tocline"><a class="tocxref" href="#references"><span class="secno">C. </span>References</a><ul class="toc"><li class="tocline"><a class="tocxref" href="#normative-references"><span class="secno">C.1 </span>Normative references</a></li></ul></li></ul></section>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   372
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   373
    <section id="introduction" class="informative">
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   374
      <!--OddPage--><h2><span class="secno">1. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   375
        Introduction
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   376
      </h2><p><em>This section is non-normative.</em></p>
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   377
      <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   378
        To enable Web pages to connect and communicate with Local-networked Services provided over <abbr title="Hypertext Transfer Protocol">HTTP</abbr>, this
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   379
        specification introduces the <a href="#navigatornetworkservice"><code>NavigatorNetworkService</code></a>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   380
        interface.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   381
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   382
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   383
        Using this <abbr title="Application Programming Interface">API</abbr> consists of requesting a well-known
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   384
        service type, known by developers and advertised by Local-networked Devices. User authorization, where the user
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   385
        connects the web page to discovered services, is expected before the web page is able to interact with any
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   386
        Local-networked Services.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   387
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   388
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   389
        A web page creates a request to obtain connectivity to services running in the network by specifying a
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   390
        well-known discovery service type that it wishes to interact with.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   391
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   392
      <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   393
        The user agent, having captured all advertised services on the network from the <a class="internalDFN" href="#dfn-service-discovery-mechanisms">service discovery
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   394
        mechanisms</a> included in this recommendation, attempts to match the requested service type to a discovered
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   395
        service according to the processing described herein.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   396
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   397
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   398
        If a service connectivity request is successful then the Web page is provided with the necessary information to
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   399
        communicate with the authorized Local-networked Service. If the request fails then the Web page will receive an
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   400
        error callback containing an error code describing the cause of Local-networked Service connectivity failure.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   401
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   402
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   403
        Once connected to a Local-networked Service the Web page can send requests and receive responses to the
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   404
        Local-networked Service via the messaging format and appropriate channel inferred from the service type
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   405
        authorized via the provided <abbr title="Application Programming Interface">API</abbr>. The Web page, once connected, can also receive service-pushed events, in the
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   406
        messaging format supported by the Local-networked Device, if such event subscription functionality is provided
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   407
        by the connected Local-networked Service.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   408
      </p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   409
      <p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   410
        Services available within the local network can connect and disconnect at different times during the execution of a web page. The user agent can inform a web page when the state of networked services matching any of the requested valid service types change. Web pages can use this information to enable in-page experiences for communicating the state of networked services with the ability to change the particular service or set of services the page is connected to (by re-invoking the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method defined herein).
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   411
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   412
      <div class="example">
191
5e0da09685f7 Discovery API updates following feedback from http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0016.html
Rich Tibbett <richt@opera.com>
parents: 180
diff changeset
   413
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   414
          Example of requesting a <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> advertised service:
191
5e0da09685f7 Discovery API updates following feedback from http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0016.html
Rich Tibbett <richt@opera.com>
parents: 180
diff changeset
   415
        </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   416
        <hr>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   417
        <pre class="highlight prettyprint"><span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   418
  </span><span class="com">// Show a list of all the services provided to the web page</span><span class="pln">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   419
  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   420
</span><span class="pun">}</span><span class="pln">
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   421
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   422
navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">(</span><span class="str">'zeroconf:_boxee-jsonrpc._tcp'</span><span class="pun">,</span><span class="pln"> showServices</span><span class="pun">);</span></pre>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   423
      </div>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   424
      <div class="example">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   425
        <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   426
          Example of requesting a UPnP advertised service, also handling error conditions:
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   427
        </p>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   428
        <hr>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   429
        <pre class="highlight prettyprint"><span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   430
  </span><span class="com">// Show a list of all the services provided to the web page</span><span class="pln">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   431
  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln"> console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">name </span><span class="pun">);</span><span class="pln">
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   432
</span><span class="pun">}</span><span class="pln">
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   433
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   434
</span><span class="kwd">function</span><span class="pln"> error</span><span class="pun">(</span><span class="pln"> e </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   435
  console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> </span><span class="str">"Error occurred: "</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> e</span><span class="pun">.</span><span class="pln">code </span><span class="pun">);</span><span class="pln">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   436
</span><span class="pun">}</span><span class="pln">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   437
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   438
navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">(</span><span class="str">'upnp:urn:schemas-upnp-org:service:ContentDirectory:1'</span><span class="pun">,</span><span class="pln"> showServices</span><span class="pun">,</span><span class="pln"> error</span><span class="pun">);</span></pre>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   439
      </div>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   440
      <div class="example">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   441
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   442
          Example of requesting either a <abbr title="Domain Name System">DNS</abbr>-<abbr title="Service Discovery">SD</abbr> or UPnP advertised service:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   443
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   444
        <hr>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   445
        <pre class="highlight prettyprint"><span class="kwd">function</span><span class="pln"> showServices</span><span class="pun">(</span><span class="pln"> services </span><span class="pun">)</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   446
  </span><span class="com">// Show a list of all the services provided to the web page (+ service type)</span><span class="pln">
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   447
  </span><span class="kwd">for</span><span class="pun">(</span><span class="kwd">var</span><span class="pln"> i </span><span class="pun">=</span><span class="pln"> </span><span class="lit">0</span><span class="pun">,</span><span class="pln"> l </span><span class="pun">=</span><span class="pln"> services</span><span class="pun">.</span><span class="pln">length</span><span class="pun">;</span><span class="pln"> i </span><span class="pun">&lt;</span><span class="pln"> l</span><span class="pun">;</span><span class="pln"> i</span><span class="pun">++)</span><span class="pln">
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   448
     console</span><span class="pun">.</span><span class="pln">log</span><span class="pun">(</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">name </span><span class="pun">+</span><span class="pln"> </span><span class="str">'('</span><span class="pln"> </span><span class="pun">+</span><span class="pln"> services</span><span class="pun">[</span><span class="pln">i</span><span class="pun">].</span><span class="pln">type </span><span class="pun">+</span><span class="pln"> </span><span class="str">')'</span><span class="pln"> </span><span class="pun">);</span><span class="pln">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   449
</span><span class="pun">}</span><span class="pln">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   450
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   451
navigator</span><span class="pun">.</span><span class="pln">getNetworkServices</span><span class="pun">([</span><span class="pln">
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   452
  </span><span class="str">'zeroconf:_boxee-jsonrpc._tcp'</span><span class="pun">,</span><span class="pln">
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   453
  </span><span class="str">'upnp:urn:schemas-upnp-org:service:ContentDirectory:1'</span><span class="pln">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   454
</span><span class="pun">],</span><span class="pln"> showServices</span><span class="pun">);</span></pre>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   455
      </div>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   456
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   457
        For more detailed examples see the <a href="#examples">Examples</a> section.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   458
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   459
    </section>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   460
    <section id="conformance"><!--OddPage--><h2><span class="secno">2. </span>Conformance</h2>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   461
<p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   462
  As well as sections marked as non-normative, all authoring guidelines, diagrams, examples,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   463
  and notes in this specification are non-normative. Everything else in this specification is
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   464
  normative.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   465
</p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   466
<p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   467
  The key words <em title="MUST" class="rfc2119">MUST</em>, <em title="MUST NOT" class="rfc2119">MUST NOT</em>, <em title="REQUIRED" class="rfc2119">REQUIRED</em>, <em title="SHOULD" class="rfc2119">SHOULD</em>, <em title="SHOULD NOT" class="rfc2119">SHOULD NOT</em>, <em title="RECOMMENDED" class="rfc2119">RECOMMENDED</em>, <em title="MAY" class="rfc2119">MAY</em>,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   468
  and <em title="OPTIONAL" class="rfc2119">OPTIONAL</em> in this specification are to be interpreted as described in [<cite><a href="#bib-RFC2119" class="bibref">RFC2119</a></cite>].
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   469
</p>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   470
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   471
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   472
        Requirements phrased in the imperative as part of algorithms (such as "strip any leading space characters" or
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   473
        "return false and abort these steps") are to be interpreted with the meaning of the key word ("must", "should",
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   474
        "may", etc) used in introducing the algorithm.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   475
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   476
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   477
        Some conformance requirements are phrased as requirements on attributes, methods or objects. Such requirements
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   478
        are to be interpreted as requirements on user agents.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   479
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   480
      <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   481
        Conformance requirements phrased as algorithms or specific steps <em title="MAY" class="rfc2119">MAY</em> be implemented in any manner, so long as
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   482
        the end result is equivalent. (In particular, the algorithms defined in this specification are intended to be
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   483
        easy to follow, and not intended to be performant.)
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   484
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   485
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   486
        The only conformance class defined by this specification is a <dfn id="dfn-user-agent">user agent</dfn>.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   487
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   488
      <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   489
        User agents <em title="MAY" class="rfc2119">MAY</em> impose implementation-specific limits on otherwise unconstrained inputs, e.g. to prevent denial
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   490
        of service attacks, to guard against running out of memory, or to work around platform-specific limitations.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   491
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   492
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   493
        When support for a feature is disabled (e.g. as an emergency measure to mitigate a security problem, or to aid
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   494
        in development, or for performance reasons), user agents <em title="MUST" class="rfc2119">MUST</em> act as if they had no support for the feature
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   495
        whatsoever, and as if the feature was not mentioned in this specification. For example, if a particular feature
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   496
        is accessed via an attribute in a Web IDL interface, the attribute itself would be omitted from the objects
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   497
        that implement that interface - leaving the attribute on the object but making it return null or throw an
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   498
        exception is insufficient.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   499
      </p>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   500
      <section id="dependencies">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   501
        <h3><span class="secno">2.1 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   502
          Dependencies
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   503
        </h3>This specification relies on several other underlying specifications.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   504
        <dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   505
          <dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   506
            HTML
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   507
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   508
          <dd>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   509
            Many fundamental concepts from HTML are used by this specification. [<cite><a href="#bib-HTML5" class="bibref">HTML5</a></cite>]
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   510
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   511
          <dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   512
            WebIDL
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   513
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   514
          <dd>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   515
            The IDL blocks in this specification use the semantics of the WebIDL specification. [<cite><a href="#bib-WEBIDL" class="bibref">WEBIDL</a></cite>]
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   516
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   517
        </dl>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   518
      </section>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   519
    </section>
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   520
    <section id="terminology">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   521
      <!--OddPage--><h2><span class="secno">3. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   522
        Terminology
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   523
      </h2>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   524
      <p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   525
        The construction "a <code>Foo</code> object", where <code>Foo</code> is actually an interface, is sometimes
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   526
        used instead of the more accurate "an object implementing the interface <code>Foo</code>".
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   527
      </p>
230
3c13dc93cfb1 Re-write of Section 7: Service Discovery according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0017.html
Rich Tibbett <richt@opera.com>
parents: 216
diff changeset
   528
      <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   529
        The term DOM is used to refer to the <abbr title="Application Programming Interface">API</abbr> set made available to scripts in Web applications, and does not
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   530
        necessarily imply the existence of an actual <code>Document</code> object or of any other <code>Node</code>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   531
        objects as defined in the DOM Core specifications. [<cite><a href="#bib-DOM4" class="bibref">DOM4</a></cite>]
230
3c13dc93cfb1 Re-write of Section 7: Service Discovery according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0017.html
Rich Tibbett <richt@opera.com>
parents: 216
diff changeset
   532
      </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   533
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   534
        An IDL attribute is said to be <em>getting</em> when its value is being retrieved (e.g. by author script), and
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   535
        is said to be <em>setting</em> when a new value is assigned to it.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   536
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   537
      <p>
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   538
        A <dfn id="dfn-valid-service-type">valid service type</dfn> is any of the following:
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   539
      </p>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   540
      <ul>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   541
        <li>a string that begins with <code>upnp:</code> or <code>zeroconf:</code> followed by one or more characters
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   542
        in the ranges U+0021, U+0023 to U+0027, U+002A to U+002B, U+002D to U+002E, U+0030 to U+0039, U+0041 to U+005A,
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   543
        U+005E to U+007E.
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   544
        </li>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   545
        <li>a string that begins with <code>dial:</code> followed by an integer version.
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   546
        </li>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   547
      </ul>
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   548
      <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   549
        A <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> provided in the <code>type</code> attribute of the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method will be matched against the
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   550
        services currently contained in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> according to the algorithms
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   551
        defined in this specification.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   552
      </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   553
      <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   554
        A <dfn id="dfn-user-agent-generated-callback-url">user-agent generated callback url</dfn> is a Local-network accessible <abbr title="Uniform Resource Locator">URL</abbr> endpoint that a <a class="internalDFN" href="#dfn-user-agent">user
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   555
        agent</a> generates and maintains for receiving <abbr title="Hypertext Transfer Protocol">HTTP</abbr> NOTIFY requests from UPnP Event sources. It is only
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   556
        required when the user agent implements UPnP Service Discovery as defined in this specification.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   557
      </p>
389
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   558
      <p>
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   559
        In this specification we use the following terms to describe the processes required for Local-networked
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   560
        Services management:
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   561
      </p>
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   562
      <ul>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   563
        <li>A <dfn id="dfn-new-service">new service</dfn> is a Local-networked Service that has not previously been discovered or registered
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   564
        in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>.
389
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   565
        </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   566
        <li>An <dfn id="dfn-existing-service">existing service</dfn> is a Local-networked Service that has previously been discovered and is
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   567
        registered in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>.
389
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   568
        </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   569
        <li>A <dfn id="dfn-current-service">current service</dfn> is a Local-networked Service, represented by a <a href="#networkservice"><code>NetworkService</code></a> object, that is currently being shared with a web page via a
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   570
        <a href="#networkservices"><code>NetworkServices</code></a> object registered in the <a class="internalDFN" href="#dfn-list-of-active-service-managers">list of active service
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   571
        managers</a>.
389
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   572
        </li>
d5d955fd77bc Update NSD API Overview.html file
Rich Tibbett <richt@opera.com>
parents: 379
diff changeset
   573
      </ul>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   574
    </section>
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   575
    <section id="requesting-networked-services">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   576
      <!--OddPage--><h2><span class="secno">4. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   577
        Requesting networked services
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   578
      </h2>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   579
      <pre class="widl">[Supplemental, NoInterfaceObject]
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   580
interface <dfn id="navigatornetworkservice">NavigatorNetworkService</dfn> {
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   581
  // Obtain a Local-networked Service
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   582
  void <a href="#dom-navigator-getnetworkservices">getNetworkServices</a>( in any type,
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   583
                           in <a href="#navigatornetworkservicesuccesscallback">NavigatorNetworkServiceSuccessCallback</a> successCallback,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   584
                           in optional <a href="#navigatornetworkserviceerrorcallback">NavigatorNetworkServiceErrorCallback</a> errorCallback );
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   585
};
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   586
<a class="externalDFN" href="http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">Navigator</a> implements <a href="#navigatornetworkservice">NavigatorNetworkService</a>;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   587
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   588
[Callback=FunctionOnly, NoInterfaceObject]
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   589
interface <dfn id="navigatornetworkservicesuccesscallback">NavigatorNetworkServiceSuccessCallback</dfn> {
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   590
  void handleEvent( in <a href="#networkservices">NetworkServices</a> services );
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   591
};
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   592
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   593
[NoInterfaceObject]
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   594
interface <dfn id="navigatornetworkserviceerror">NavigatorNetworkServiceError</dfn> {
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   595
  const unsigned short <a href="#dom-navigatornetworkserviceerror-permission_denied">PERMISSION_DENIED_ERR</a> = 1;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   596
  const unsigned short <a href="#dom-navigatornetworkserviceerror-unknown_type_prefix">UNKNOWN_TYPE_PREFIX_ERR</a> = 2;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   597
  readonly attribute unsigned short <a href="#dom-navigatornetworkserviceerror-code">code</a>;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   598
};
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   599
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   600
[Callback=FunctionOnly, NoInterfaceObject]
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   601
interface <dfn id="navigatornetworkserviceerrorcallback">NavigatorNetworkServiceErrorCallback</dfn> {
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   602
  void handleEvent( in <a href="#navigatornetworkserviceerror">NavigatorNetworkServiceError</a> error );
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   603
};
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   604
</pre>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   605
      <section id="methods">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   606
        <h3><span class="secno">4.1 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   607
          Methods
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   608
        </h3>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   609
        <dl class="domintro">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   610
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   611
            <var title="">window</var> . <code title="dom-navigator"><a href="http://www.whatwg.org/specs/web-apps/current-work/complete/timers.html#navigator">navigator</a></code> .
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   612
            <code title="dom-navigator-getNetworkServices"><a href="#dom-navigator-getnetworkservices">getNetworkServices</a></code> ( <var title="">type</var> , <var title="">successCallback</var> [, <var title="">errorCallback</var> ] )
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   613
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   614
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   615
            <p>
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   616
              Prompts the user to select discovered network services that have advertised support for the requested
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   617
              service type.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   618
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   619
            <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   620
              The <var title="">type</var> argument contains one or more <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens that the web
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   621
              page would like to interact with.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   622
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   623
            <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   624
              If the user accepts, the <var title="">successCallback</var> is invoked, with zero or more <a href="#networkservice"><code>NetworkService</code></a> objects as its argument.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   625
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   626
            <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   627
              If the user declines, the <var title="">errorCallback</var> (if any) is invoked.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   628
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   629
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   630
        </dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   631
        <div>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   632
          <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   633
            When the <dfn id="dom-navigator-getnetworkservices" title="dom-navigator-getnetworkservices"><code>getNetworkServices(type, successCallback[,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   634
               errorCallback])</code></dfn> method is called, the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> run the following steps:
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   635
          </p>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   636
          <ol class="rule">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   637
            <li>Let <var>requested control types</var> be initially set to an empty array.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   638
            </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   639
            <li>If <var>type</var> is an array consisting of one or more <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens, then let
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   640
            <var>requested control types</var> by the value of <var>type</var>, removing any non-<a class="internalDFN" href="#dfn-valid-service-type">valid service
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   641
            type</a> tokens from the resulting array.
333
5e7aecddf47a Compile editor's draft
Rich Tibbett <richt@opera.com>
parents: 254
diff changeset
   642
            </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   643
            <li>If <var>type</var> is a string consisting of one <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> token, then let
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   644
            <var>requested control types</var> be an array containing one item with a value of <var>type</var>.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   645
            </li>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   646
            <li>If <var>requested control types</var> is an array that contains at least one or more <a class="internalDFN" href="#dfn-valid-service-type" title="valid service type">valid service type</a> tokens then continue to the step labeled <em>process</em>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   647
            below. Otherwise, the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   648
                  object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 2
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   649
                  (<a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a>) as
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   650
                  its argument, abort any remaining steps and return.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   651
            </li>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   652
            <li>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   653
              <em>Process</em>: Let <var>services found</var> be an empty array.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   654
            </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   655
            <li>For each <var>available service</var> in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> run the following
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   656
            steps:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   657
              <ol class="rule">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   658
                <li>For each <var>requested control type</var> in <var>requested control types</var>: If <var>available
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   659
                service</var>'s <code>type</code> attribute equals the <var>requested control type</var> then let <var>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   660
                  matched service</var> equal the value of <var>available service</var> and continue at the step
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   661
                  labeled <var>attach</var> below.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   662
                </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   663
                <li>Continue at the next <var>available service</var>.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   664
                </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   665
                <li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   666
                  <em>Attach</em>: If <var>matched service</var> is not empty then run the following steps:
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   667
                  <ol class="rule">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   668
                    <li>Let <var>new service object</var> be a new <a href="#networkservice"><code>NetworkService</code></a> object, mapping the parameters of <var>matched
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   669
                    service</var> to this new object where possible.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   670
                    </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   671
                    <li>Append <var>new service object</var> to the <var>services found</var> array.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   672
                    </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   673
                  </ol>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   674
                </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   675
              </ol>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   676
            </li>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   677
            <li>Return, and run the remaining steps asynchronously.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   678
            </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   679
            <li>Optionally, e.g. based on a previously-established user preference, for security reasons, or due to
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   680
            platform limitations, the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MAY" class="rfc2119">MAY</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   681
                  object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   682
                  (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   683
                  argument, abort any remaining steps and return.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   684
            </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   685
            <li>The user agent <em title="MUST NOT" class="rfc2119">MUST NOT</em> provide the entry script's origin with a <a href="#networkservices"><code>NetworkServices</code></a> object without prior permission given by the user.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   686
              <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   687
                If <var>services found</var> is not an empty array then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MAY" class="rfc2119">MAY</em> choose to prompt the
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   688
                user in a user-agent-specific manner for permission to provide the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> with a <a href="#networkservices"><code>NetworkServices</code></a>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   689
                   object representing the <a class="internalDFN" href="#dfn-user-authorized">user-authorized</a> subset of <var>services found</var>.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   690
              </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   691
              <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   692
                Alternatively, the user agent <em title="MAY" class="rfc2119">MAY</em> choose to queue a task to invoke <var>successCallback</var> or
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   693
                <var>errorCallback</var> immediately based on a previously-established user previously, for security
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   694
                reasons, or due to platform limitations. In such an implementation, if <var>successCallback</var> is to
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   695
                be fired as a result of a previously-established user preference then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   696
                continue at the next step of this algorithm.
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   697
              </p>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   698
              <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   699
                If permission has been granted by the user to access one or more networked services then the <a class="internalDFN" href="#dfn-user-agent">user
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   700
                agent</a> <em title="SHOULD" class="rfc2119">SHOULD</em> include an "ongoing local-network communication" indicator.
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   701
              </p>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   702
              <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   703
                If permission has been denied by the user, <a class="internalDFN" href="#dfn-user-agent">user agent</a> or platform, then the <a class="internalDFN" href="#dfn-user-agent">user agent</a>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   704
                <em title="MUST" class="rfc2119">MUST</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>errorCallback</var>, if it is provided and is an
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   705
                   object of type <code>Function</code>, with a new <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object whose <a href="#dom-navigatornetworkserviceerror-code"><code>code</code></a> attribute has the numeric value 1
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   706
                   (<a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a>) as its
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   707
                   argument, abort any remaining steps and return.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   708
              </p>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   709
              <p>
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   710
                If the user never responds or no previously-established user preference has been met, this algorithm
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   711
                stalls on this step.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   712
              </p>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   713
            </li>
254
f29ec967fb3b Editorial updates to NSD spec
Rich Tibbett <richt@opera.com>
parents: 250
diff changeset
   714
            <li>Let <var>services</var> be an empty array.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   715
            </li>
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   716
            <li>If <var>services found</var> is not an empty array then set <var>services</var> to be an array of one
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   717
            or more <a href="#networkservice"><code>NetworkService</code></a> objects for which the user granted
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   718
            permission above - known as the current objects <dfn id="dfn-user-authorized">user-authorized</dfn> services.
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   719
            </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   720
            <li>Remove all previously whitelisted urls from the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a> granted in
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   721
            the current <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a>.
254
f29ec967fb3b Editorial updates to NSD spec
Rich Tibbett <richt@opera.com>
parents: 250
diff changeset
   722
            </li>
f29ec967fb3b Editorial updates to NSD spec
Rich Tibbett <richt@opera.com>
parents: 250
diff changeset
   723
            <li>For each Object <var>service</var> in <var>services</var>, if any, run the following sub-steps:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   724
              <ol class="rule">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   725
                <li>Add the <var>service</var>'s <code>url</code> parameter to the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   726
                  <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   727
                </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   728
                <li>If <var>service</var>'s <code>type</code> parameter begins with the DOMString "<code>upnp:</code>"
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   729
                and the <var>service</var>'s <code>eventsUrl</code> parameter is not empty then <a class="internalDFN" href="#dfn-setup-a-upnp-events-subscription">setup a UPnP Events
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   730
                Subscription</a> for <var>service</var>.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   731
                </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   732
              </ol>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   733
            </li>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   734
            <li>Let <var>services manager</var> be a new <a href="#networkservices"><code>NetworkServices</code></a>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   735
            object.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   736
            </li>
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   737
            <li>Store <var>requested control types</var> against <var>services manager</var> as an internal variable.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   738
            </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   739
            <li>Set <var>services manager</var>'s <a href="#dom-networkservices-servicesavailable"><code>servicesAvailable</code></a> attribute to the number of
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   740
            items currently found in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> whose <code>type</code> property
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   741
            matches any of the tokens requested in <var>requested control types</var>.
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   742
            </li>
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   743
            <li>Add <var>services</var>, if any, to the <var>services manager</var> object as its collection of
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   744
            <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a>. If <var>services</var> is an empty array then the <var>services manager</var>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   745
            does not have any <var>indexed properties</var>.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   746
            </li>
250
8b912f2bb9c7 Updates to Service Discovery & Messaging according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Oct/0005.html
Rich Tibbett <richt@opera.com>
parents: 247
diff changeset
   747
            <li>Set <var>services manager</var>'s <a href="#dom-networkservices-length"><code>length</code></a>
8b912f2bb9c7 Updates to Service Discovery & Messaging according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Oct/0005.html
Rich Tibbett <richt@opera.com>
parents: 247
diff changeset
   748
            attribute to the number of items in <var>services</var>.
8b912f2bb9c7 Updates to Service Discovery & Messaging according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Oct/0005.html
Rich Tibbett <richt@opera.com>
parents: 247
diff changeset
   749
            </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   750
            <li>Add <var>services manager</var> to the <a class="internalDFN" href="#dfn-list-of-active-service-managers">list of active service managers</a>.
250
8b912f2bb9c7 Updates to Service Discovery & Messaging according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Oct/0005.html
Rich Tibbett <richt@opera.com>
parents: 247
diff changeset
   751
            </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   752
            <li>The <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#queue-a-task" class="externalDFN">queue a task</a> to invoke <var>successCallback</var> with <var>services
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   753
                  manager</var> as its argument.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   754
            </li>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   755
          </ol>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   756
          <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   757
            The <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#task-source" class="externalDFN">task source</a> for these <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#concept-task" class="externalDFN">tasks</a> is the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/webappapis.html#user-interaction-task-source" class="externalDFN">user interaction task source</a>.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   758
          </p>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   759
          <p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   760
            When a <a href="#networkservice"><code>NetworkService</code></a> object is provided to a Web page, the
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   761
            <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em title="MUST" class="rfc2119">MUST</em> add the <code>url</code> property to the <dfn id="dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   762
            whitelist</dfn>. This list enables the Web page to override and initiate cross-site resource requests
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   763
            towards these URLs, and any sub-resources of these URLs, within the current <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> via various existing mechanisms (e.g. Web Sockets, Server-Sent Events,
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   764
               Web Messaging, XMLHttpRequest).
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   765
          </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   766
          <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   767
            If the user navigates away from the <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/browsers.html#entry-script" class="externalDFN">entry script</a>'s <a href="http://www.whatwg.org/specs/web-apps/current-work/complete/origin-0.html#origin" class="externalDFN">origin</a> then the <a class="internalDFN" href="#dfn-user-agent">user agent</a> <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> remove all previously
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   768
               whitelisted urls from the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>. There is no persistence to network
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   769
               service selections provided to a web page. It is not possible to access a previously white-listed
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   770
               networked service without the necessary user authorization in all of the following cases:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   771
          </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   772
          <ul>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   773
            <li>If the current script is reloaded at any point in the same or different window.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   774
            </li>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   775
            <li>if the current script reinvokes the <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a> method at any point in its
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   776
            execution.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   777
            </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   778
            <li>If the user navigates forward or back in their history to reload the current page.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   779
            </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   780
            <li>If a script is running in a different origin.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   781
            </li>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   782
          </ul>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   783
        </div>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   784
      </section>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   785
      <section id="error-handling">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   786
        <h3><span class="secno">4.2 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   787
          Error Handling
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   788
        </h3>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   789
        <dl class="domintro">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   790
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   791
            <var title="">error</var> . <code title="dom-NavigatorNetworkServiceError-code"><a href="#dom-navigatornetworkserviceerror-code">code</a></code>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   792
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   793
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   794
            <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   795
              Returns the current error's error code. At the current time, this will be <code>1</code> or
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   796
              <code>2</code>, for which the corresponding error constants <a href="#dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></a> and <a href="#dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></a> are
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   797
              defined.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   798
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   799
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   800
        </dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   801
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   802
          The <dfn id="dom-navigatornetworkserviceerror-code" title="dom-navigatornetworkserviceerror-code"><code>code</code></dfn> attribute of a <a href="#navigatornetworkserviceerror"><code>NavigatorNetworkServiceError</code></a> object <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> return the code for the error, which will be one of the following:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   803
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   804
        <dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   805
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   806
            <dfn id="dom-navigatornetworkserviceerror-permission_denied" title="dom-navigatornetworkserviceerror-permission_denied"><code>PERMISSION_DENIED_ERR</code></dfn>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   807
                (numeric value 1)
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   808
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   809
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   810
            The user or user agent denied the page permission to access any services.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   811
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   812
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   813
            <dfn id="dom-navigatornetworkserviceerror-unknown_type_prefix" title="dom-navigatornetworkserviceerror-unknown_type_prefix"><code>UNKNOWN_TYPE_PREFIX_ERR</code></dfn>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   814
                (numeric value 2)
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   815
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   816
          <dd>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   817
            No <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens were provided in the method invocation.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   818
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   819
        </dl>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   820
      </section>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   821
    </section>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   822
    <section id="obtaining-networked-services">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   823
      <!--OddPage--><h2><span class="secno">5. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   824
        Obtaining networked services
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   825
      </h2>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   826
      <p>
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   827
        The <a href="#networkservices"><code>NetworkServices</code></a> interface represents a collection of zero or
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   828
        more <dfn id="dfn-indexed-properties">indexed properties</dfn> that are each a <a class="internalDFN" href="#dfn-user-authorized">user-authorized</a> <a href="#networkservice"><code>NetworkService</code></a> object.
254
f29ec967fb3b Editorial updates to NSD spec
Rich Tibbett <richt@opera.com>
parents: 250
diff changeset
   829
      </p>
f29ec967fb3b Editorial updates to NSD spec
Rich Tibbett <richt@opera.com>
parents: 250
diff changeset
   830
      <p>
f29ec967fb3b Editorial updates to NSD spec
Rich Tibbett <richt@opera.com>
parents: 250
diff changeset
   831
        A <a href="#networkservices"><code>NetworkServices</code></a> object is the top level success callback
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   832
        parameter from a call to <a href="#dom-navigator-getnetworkservices"><code>getNetworkServices()</code></a>.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   833
      </p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   834
      <pre class="widl">[NoInterfaceObject]
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   835
interface <dfn id="networkservices">NetworkServices</dfn> {
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   836
  readonly attribute unsigned long    <a href="#dom-networkservices-length">length</a>;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   837
  getter <a href="#networkservice">NetworkService</a> (unsigned long index);
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   838
  <a href="#networkservice">NetworkService</a>? <a href="#dom-networkservices-getservicebyid">getServiceById</a>(DOMString id);
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   839
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   840
  readonly attribute unsigned long    <a href="#dom-networkservices-servicesavailable">servicesAvailable</a>;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   841
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   842
  // event handler attributes
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   843
           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservices-onserviceavailable">onserviceavailable</a>;
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   844
           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservices-onserviceunavailable">onserviceunavailable</a>;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   845
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   846
};
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   847
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   848
<a href="#networkservices">NetworkServices</a> implements <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget" class="externalDFN">EventTarget</a>;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   849
</pre>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   850
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   851
      <section id="attributes">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   852
        <h3><span class="secno">5.1 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   853
          Attributes
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   854
        </h3>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   855
        <dl class="domintro">
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   856
          <dt>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   857
            <code title="dom-networkservices-length"><a href="#dom-networkservices-length">length</a></code>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   858
          </dt>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   859
          <dd>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   860
            <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   861
              Returns the current number of <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a> in the current object's collection.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   862
            </p>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   863
          </dd>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   864
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   865
            <code title="dom-networkservices-servicesavailable"><a href="#dom-networkservices-servicesavailable">servicesAvailable</a></code>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   866
          </dt>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   867
          <dd>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   868
            <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   869
              Returns the current number of items matching one of the app-requested <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens in
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   870
              the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a>.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   871
            </p>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   872
          </dd>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   873
        </dl>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   874
        <div>
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   875
          <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   876
            The <dfn id="dom-networkservices-length"><code>length</code></dfn> attribute <em title="MUST" class="rfc2119">MUST</em> return the number of
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   877
            <a href="#networkservice"><code>NetworkService</code></a> objects represented by the collection.
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   878
          </p>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   879
          <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   880
            The <dfn id="dom-networkservices-servicesavailable"><code>servicesAvailable</code></dfn> attribute <em title="MUST" class="rfc2119">MUST</em>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   881
            return the number of services in the <a class="internalDFN" href="#dfn-list-of-available-service-records">list of available service records</a> whose <code>type</code>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   882
            attribute matches any of the <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> tokens that were initially used to create the current
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   883
            <a href="#networkservices"><code>NetworkServices</code></a> object.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   884
          </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   885
        </div>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   886
      </section>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   887
      <section id="methods-1">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   888
        <h3><span class="secno">5.2 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   889
          Methods
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   890
        </h3>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   891
        <dl class="domintro">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   892
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   893
            <code title="networkservices-getter"><a href="#networkservices">services</a></code> [ <var title="">index</var> ]
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   894
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   895
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   896
            <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   897
              Returns the specified <a href="#networkservice"><code>NetworkService</code></a> object.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   898
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   899
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   900
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   901
            <code title="networkservices-getter"><a href="#networkservices">services</a></code> . <code title="dom-networkservices-getservicebyid"><a href="#dom-networkservices-getservicebyid">getServiceById</a></code> ( <var title="">id</var> )
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   902
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   903
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   904
            <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   905
              Returns the <a href="#networkservice"><code>NetworkService</code></a> object with the given identifier,
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   906
              or null if no service has that identifier.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   907
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   908
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   909
        </dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   910
        <p>
379
7a9a351e1577 Update compiled editor's draft of NSD API with latest changes
Rich Tibbett <richt@opera.com>
parents: 333
diff changeset
   911
          A <a href="#networkservices"><code>NetworkServices</code></a> object represents the current collection of
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   912
          zero or more <a href="#networkservice"><code>NetworkService</code></a> objects - its <a class="internalDFN" href="#dfn-indexed-properties-1">indexed
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   913
          properties</a>. The <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a> of a <a href="#networkservices"><code>NetworkServices</code></a> object are <span>immutable</span> meaning that <a class="internalDFN" href="#dfn-indexed-properties-1">indexed
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   914
          properties</a> cannot be added and <a class="internalDFN" href="#dfn-indexed-properties-1">indexed properties</a> cannot be removed for the lifetime of a <a href="#networkservices"><code>NetworkServices</code></a> object.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   915
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   916
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   917
          The <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#supported-property-indices" class="externalDFN">supported property indices</a> of <a href="#networkservices"><code>NetworkServices</code></a> objects at any instant are the numbers from zero to
250
8b912f2bb9c7 Updates to Service Discovery & Messaging according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Oct/0005.html
Rich Tibbett <richt@opera.com>
parents: 247
diff changeset
   918
             the number of the <a href="#networkservice"><code>NetworkService</code></a> objects in the collection
8b912f2bb9c7 Updates to Service Discovery & Messaging according to feedback @ http://lists.w3.org/Archives/Public/public-device-apis/2012Oct/0005.html
Rich Tibbett <richt@opera.com>
parents: 247
diff changeset
   919
             minus one.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   920
        </p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   921
        <div class="note"><div class="note-title"><span>Note</span></div><p class="">
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   922
          Each service in a <a href="#networkservices"><code>NetworkServices</code></a> object thus has an index; the
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   923
          first has the index 0, and each subsequent service is numbered one higher than the previous one.
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   924
        </p></div>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   925
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   926
          To <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#determine-the-value-of-an-indexed-property" class="externalDFN">determine the value of an indexed property</a> for a given index <var>index</var> in a
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   927
             <a href="#networkservices"><code>NetworkServices</code></a> object the user agent <em title="MUST" class="rfc2119">MUST</em> return the <a href="#networkservice"><code>NetworkService</code></a> object that represents the <var>index</var>th item in
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   928
             the collection.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   929
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   930
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   931
          The <dfn id="dom-networkservices-getservicebyid"><code>getServiceById(id)</code></dfn> method <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> return the first <a href="#networkservice"><code>NetworkService</code></a> object in the
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   932
          collection whose <a href="#dom-networkservice-id"><code>id</code></a> attribute is equal to the value of the
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   933
          <var>id</var> argument provided. When no <a href="#networkservice"><code>NetworkService</code></a> objects
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   934
          match the given argument, the method <em title="MUST" class="rfc2119">MUST</em> return null.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   935
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   936
      </section>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   937
      <section id="events">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   938
        <h3><span class="secno">5.3 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   939
          Events
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   940
        </h3>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   941
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   942
          The following are the event handlers (and their corresponding event handler event types) that <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> be supported, as IDL attributes, by all objects implementing the <a href="#networkservices"><code>NetworkServices</code></a> interface:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   943
        </p>
243
220f3226b2a1 Apply pub rules to proposed Working Draft update
Rich Tibbett <richt@opera.com>
parents: 241
diff changeset
   944
        <table border="1">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   945
          <thead>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   946
            <tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   947
              <th>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   948
                <span title="event handlers">Event handler</span>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   949
              </th>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   950
              <th>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   951
                <span>Event handler event type</span>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   952
              </th>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   953
            </tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   954
          </thead>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   955
          <tbody>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   956
            <tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   957
              <td>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   958
                <dfn id="dom-networkservices-onserviceavailable" title="dom-NetworkServices-onserviceavailable"><code>onserviceavailable</code></dfn>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   959
              </td>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   960
              <td>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   961
                <a href="#event-serviceavailable"><code>serviceavailable</code></a>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   962
              </td>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   963
            </tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   964
            <tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   965
              <td>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   966
                <dfn id="dom-networkservices-onserviceunavailable" title="dom-NetworkServices-onserviceunavailable"><code>onserviceunavailable</code></dfn>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   967
              </td>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   968
              <td>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   969
                <a href="#event-serviceunavailable"><code>serviceunavailable</code></a>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   970
              </td>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   971
            </tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   972
          </tbody>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   973
        </table>
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   974
      </section>
194
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   975
    </section>
ad608906c611 Minor editorial to Networked Service Discovery
Rich Tibbett <richt@opera.com>
parents: 191
diff changeset
   976
    <section id="communicating-with-a-networked-service">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   977
      <!--OddPage--><h2><span class="secno">6. </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   978
        Communicating with a networked service
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   979
      </h2>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   980
      <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   981
        The <a href="#networkservice"><code>NetworkService</code></a> interface is used to provide a set of connection
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   982
        information for an <abbr title="Hypertext Transfer Protocol">HTTP</abbr> service endpoint and if available, service events, running on a networked device.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
   983
      </p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   984
      <pre class="widl">[NoInterfaceObject]
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   985
interface <dfn id="networkservice">NetworkService</dfn> {
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   986
  readonly attribute DOMString        <a href="#dom-networkservice-id">id</a>;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   987
  readonly attribute DOMString        <a href="#dom-networkservice-name">name</a>;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   988
  readonly attribute DOMString        <a href="#dom-networkservice-type">type</a>;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   989
  readonly attribute DOMString        <a href="#dom-networkservice-url">url</a>;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   990
  readonly attribute DOMString        <a href="#dom-networkservice-config">config</a>;
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   991
191
5e0da09685f7 Discovery API updates following feedback from http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0016.html
Rich Tibbett <richt@opera.com>
parents: 180
diff changeset
   992
  readonly attribute boolean          <a href="#dom-networkservice-online">online</a>;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   993
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   994
  // event handler attributes
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   995
           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onserviceonline">onserviceonline</a>;
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   996
           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onserviceoffline">onserviceoffline</a>;
191
5e0da09685f7 Discovery API updates following feedback from http://lists.w3.org/Archives/Public/public-device-apis/2012Aug/0016.html
Rich Tibbett <richt@opera.com>
parents: 180
diff changeset
   997
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
   998
           attribute <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#eventhandler" class="externalDFN">EventHandler</a>     <a href="#dom-networkservice-onnotify">onnotify</a>;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
   999
};
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1000
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1001
<a href="#networkservice">NetworkService</a> implements <a href="http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-eventtarget" class="externalDFN">EventTarget</a>;
180
ee3a89da06e1 First draft of Networked Service Discovery and Messaging
Rich Tibbett <richt@opera.com>
parents:
diff changeset
  1002
</pre>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1003
      <section id="attributes-1">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1004
        <h3><span class="secno">6.1 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1005
          Attributes
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1006
        </h3>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1007
        <dl class="domintro">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1008
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1009
            <var title="">service</var> . <code title="dom-networkservice-id"><a href="#dom-networkservice-id">id</a></code>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1010
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1011
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1012
            <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1013
              A unique identifier for the given user-selected service instance.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1014
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1015
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1016
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1017
            <var title="">service</var> . <code title="dom-networkservice-name"><a href="#dom-networkservice-name">name</a></code>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1018
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1019
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1020
            <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1021
              The name of the user-selected service.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1022
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1023
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1024
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1025
            <var title="">service</var> . <code title="dom-networkservice-type"><a href="#dom-networkservice-type">type</a></code>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1026
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1027
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1028
            <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1029
              The <a class="internalDFN" href="#dfn-valid-service-type">valid service type</a> token value of the user-selected service.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1030
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1031
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1032
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1033
            <var title="">service</var> . <code title="dom-networkservice-url"><a href="#dom-networkservice-url">url</a></code>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1034
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1035
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1036
            <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1037
              The control <abbr title="Uniform Resource Locator">URL</abbr> endpoint (including any required port information) of the user-selected control service
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1038
              that has been added to the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1039
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1040
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1041
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1042
            <var title="">service</var> . <code title="dom-networkservice-config"><a href="#dom-networkservice-config">config</a></code>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1043
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1044
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1045
            <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1046
              The configuration information associated with the service depending on the requested service type.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1047
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1048
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1049
        </dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1050
        <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1051
          The <dfn id="dom-networkservice-id"><code>id</code></dfn> attribute is a unique identifier for the service.
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1052
          The same service provided at different times or on different objects <em title="MUST" class="rfc2119">MUST</em> have the same <a href="#dom-networkservice-id"><code>id</code></a> value.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1053
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1054
        <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1055
          The <dfn id="dom-networkservice-name"><code>name</code></dfn> attribute represents a human-readable title for
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1056
          the service.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1057
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1058
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1059
          The <dfn id="dom-networkservice-type"><code>type</code></dfn> attribute reflects the value of the <a class="internalDFN" href="#dfn-valid-service-type">valid
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1060
          service type</a> of the service.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1061
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1062
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1063
          The <dfn id="dom-networkservice-url"><code>url</code></dfn> attribute is an <a href="http://www.w3.org/TR/html5/urls.html#absolute-url" class="externalDFN">absolute <abbr title="Uniform Resource Locator">URL</abbr></a> pointing to the root <abbr title="Hypertext Transfer Protocol">HTTP</abbr> endpoint for the service that has been
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1064
             added to the <a class="internalDFN" href="#dfn-entry-script-origin-s-url-whitelist">entry script origin's <abbr title="Uniform Resource Locator">URL</abbr> whitelist</a>. Web pages can subsequently use this value for
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1065
             implicit cross-document messaging via various existing mechanisms (e.g. Web Sockets, Server-Sent Events,
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1066
             Web Messaging, XMLHttpRequest).
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1067
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1068
        <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1069
          The <dfn id="dom-networkservice-config"><code>config</code></dfn> attribute provides the raw configuration
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1070
          information extracted from the given network service.
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1071
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1072
      </section>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1073
      <section id="states">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1074
        <h3><span class="secno">6.2 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1075
          States
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1076
        </h3>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1077
        <dl class="domintro">
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1078
          <dt>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1079
            <var title="">service</var> . <code title="dom-networkservice-online"><a href="#dom-networkservice-online">online</a></code>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1080
          </dt>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1081
          <dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1082
            <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1083
              Returns <code>true</code> if the service is reporting that it is accessible on the local network or
390
6211d232766d Update spec to clarify that devices don't (necessarily) report themselves as offline
Rich Tibbett <richt@opera.com>
parents: 389
diff changeset
  1084
              <code>false</code> if the service is no longer accessible (temporarily or permanently) on the local
6211d232766d Update spec to clarify that devices don't (necessarily) report themselves as offline
Rich Tibbett <richt@opera.com>
parents: 389
diff changeset
  1085
              network.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1086
            </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1087
          </dd>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1088
        </dl>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1089
        <p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1090
          The <dfn id="dom-networkservice-online"><code>online</code></dfn> attribute indicates whether the service is
390
6211d232766d Update spec to clarify that devices don't (necessarily) report themselves as offline
Rich Tibbett <richt@opera.com>
parents: 389
diff changeset
  1091
          either <var>online</var>, and therefore accessible on the local network, in which case this attribute will
6211d232766d Update spec to clarify that devices don't (necessarily) report themselves as offline
Rich Tibbett <richt@opera.com>
parents: 389
diff changeset
  1092
          return <code>true</code> or, <var>offline</var>, and therefore not accessible on the local network, either
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1093
          temporarily or permanently, in which case this attribute will return <code>false</code>. This attribute <em title="MUST" class="rfc2119">MUST</em>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1094
          default to <code>true</code>.
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1095
        </p>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1096
      </section>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1097
      <section id="events-1">
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1098
        <h3><span class="secno">6.3 </span>
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1099
          Events
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1100
        </h3>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1101
        <p>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1102
          The following are the event handlers (and their corresponding event handler event types) that <em class="ct"><em title="MUST" class="rfc2119">MUST</em></em> be supported, as IDL attributes, by all objects implementing the <a href="#networkservice"><code>NetworkService</code></a> interface:
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1103
        </p>
243
220f3226b2a1 Apply pub rules to proposed Working Draft update
Rich Tibbett <richt@opera.com>
parents: 241
diff changeset
  1104
        <table border="1">
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1105
          <thead>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1106
            <tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1107
              <th>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1108
                <span title="event handlers">Event handler</span>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1109
              </th>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1110
              <th>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1111
                <span>Event handler event type</span>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1112
              </th>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1113
            </tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1114
          </thead>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1115
          <tbody>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1116
            <tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1117
              <td>
402
a3626e492d27 Add WD (29th March 2013) for Network Service Discovery API
Rich Tibbett <richt@opera.com>
parents: 392
diff changeset
  1118
                <dfn id="dom-networkservice-onnotify" title="dom-NetworkService-onnotify"><code>onnotify</code></dfn>
239
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1119
              </td>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1120
              <td>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1121
                <a href="#event-notify"><code>notify</code></a>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1122
              </td>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1123
            </tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett <richt@opera.com>
parents: 238
diff changeset
  1124
            <tr>
7e34654692fc HTML5 Tidy on Network Service Discovery spec markup
Rich Tibbett &