Htsp » History » Version 12
Andreas Smas, 2009-02-28 16:46
| 1 | 1 | Andreas Smas | |
|---|---|---|---|
| 2 | |||
| 3 | |||
| 4 | |||
| 5 | |||
| 6 | ---- |
||
| 7 | |||
| 8 | = Client to Server methods = |
||
| 9 | |||
| 10 | 5 | Andreas Smas | ---- |
| 11 | 1 | Andreas Smas | === getChallenge === |
| 12 | |||
| 13 | 7 | Andreas Smas | Request a 32 byte challenge used to generate a authentication digest. |
| 14 | |||
| 15 | Request message fields: |
||
| 16 | {{{ |
||
| 17 | None |
||
| 18 | }}} |
||
| 19 | |||
| 20 | Reply message fields: |
||
| 21 | {{{ |
||
| 22 | 9 | Andreas Smas | challenge bin required 32 bytes of random challenge to be used in next authentication request from client. |
| 23 | 7 | Andreas Smas | }}} |
| 24 | |||
| 25 | |||
| 26 | 5 | Andreas Smas | ---- |
| 27 | 1 | Andreas Smas | === authenticate === |
| 28 | |||
| 29 | 7 | Andreas Smas | Request message fields: |
| 30 | {{{ |
||
| 31 | 8 | Andreas Smas | username str required Username. |
| 32 | digest bin required SHA-1 hash of [password (not including terminating NUL)] + [challenge] |
||
| 33 | 7 | Andreas Smas | }}} |
| 34 | |||
| 35 | Reply message fields: |
||
| 36 | {{{ |
||
| 37 | 1 | Andreas Smas | noaccess int optional Set to '1' if access was denied. |
| 38 | 9 | Andreas Smas | challenge bin optional 32 bytes of random challenge to be used in next authentication request from client. |
| 39 | Always present if 'noaccess' is set. This is supplied so the client does not have |
||
| 40 | to issue an extra 'getChallenge' request. |
||
| 41 | 7 | Andreas Smas | }}} |
| 42 | |||
| 43 | |||
| 44 | 5 | Andreas Smas | ---- |
| 45 | 10 | Andreas Smas | === setAsync === |
| 46 | |||
| 47 | Switch the session into asynchronous mode. |
||
| 48 | When a session is in this mode the client will get continuous updates from the server about channels and tags. |
||
| 49 | This also includes creation and deletion of channels and tags. |
||
| 50 | |||
| 51 | An interactive application that presents the user with information about channels and tags would probably want to switch to this mode. |
||
| 52 | |||
| 53 | |||
| 54 | Request message fields: |
||
| 55 | {{{ |
||
| 56 | None |
||
| 57 | }}} |
||
| 58 | |||
| 59 | Reply message fields: |
||
| 60 | {{{ |
||
| 61 | None |
||
| 62 | }}} |
||
| 63 | |||
| 64 | |||
| 65 | 1 | Andreas Smas | |
| 66 | 5 | Andreas Smas | ---- |
| 67 | 1 | Andreas Smas | === getEvent === |
| 68 | 6 | Andreas Smas | |
| 69 | ---- |
||
| 70 | 1 | Andreas Smas | === subscribe === |
| 71 | 6 | Andreas Smas | |
| 72 | Request subscription to the given channel. A request for a subscription is always successful. |
||
| 73 | When the server is ready to transmit data it will first send a 'subscriptionStart' message. |
||
| 74 | 4 | Andreas Smas | |
| 75 | |||
| 76 | 1 | Andreas Smas | |
| 77 | Request message fields: |
||
| 78 | {{{ |
||
| 79 | 8 | Andreas Smas | channelId int required ID for channel. |
| 80 | subscriptionId int required Subscription ID. Selected by client. This value is not interpreted by the server in any form. |
||
| 81 | The value is used from now on in all messages related to the subscription. |
||
| 82 | 1 | Andreas Smas | }}} |
| 83 | 6 | Andreas Smas | |
| 84 | Reply message fields: |
||
| 85 | {{{ |
||
| 86 | None. |
||
| 87 | 4 | Andreas Smas | }}} |
| 88 | 6 | Andreas Smas | |
| 89 | 5 | Andreas Smas | |
| 90 | 1 | Andreas Smas | ---- |
| 91 | 5 | Andreas Smas | === unsubscribe === |
| 92 | 1 | Andreas Smas | |
| 93 | 5 | Andreas Smas | Stop a subscription. |
| 94 | Attributes |
||
| 95 | {{{ |
||
| 96 | 8 | Andreas Smas | subscriptionId int required Subscription ID. |
| 97 | 1 | Andreas Smas | }}} |
| 98 | |||
| 99 | 6 | Andreas Smas | Reply message fields: |
| 100 | {{{ |
||
| 101 | None. |
||
| 102 | }}} |
||
| 103 | 2 | Andreas Smas | |
| 104 | |||
| 105 | ---- |
||
| 106 | |||
| 107 | = Server to Client methods = |
||
| 108 | |||
| 109 | 12 | Andreas Smas | ---- |
| 110 | 2 | Andreas Smas | === channelAdd === |
| 111 | 1 | Andreas Smas | |
| 112 | 11 | Andreas Smas | A new channel has been created on the server. |
| 113 | 1 | Andreas Smas | |
| 114 | 11 | Andreas Smas | This message is only sent if session is in asynchronous mode. |
| 115 | |||
| 116 | Message fields: |
||
| 117 | {{{ |
||
| 118 | channelId int required ID of channel. |
||
| 119 | channelName str required Name of channel. |
||
| 120 | channelIcon str required URL to an icon representative for the channel. |
||
| 121 | eventId int optional ID of the current (or next to be) event on this channel. |
||
| 122 | tags str[] optional Tags this channel is mapped to. |
||
| 123 | }}} |
||
| 124 | |||
| 125 | 12 | Andreas Smas | ---- |
| 126 | 1 | Andreas Smas | === channelUpdate === |
| 127 | |||
| 128 | 11 | Andreas Smas | A channel has been updated on the server. All fields will be sent even if they are not changed. Most clients can process this and the 'channelAdd' message |
| 129 | with the very same code. |
||
| 130 | 1 | Andreas Smas | |
| 131 | 11 | Andreas Smas | This message is only sent if session is in asynchronous mode. |
| 132 | |||
| 133 | Message fields: |
||
| 134 | {{{ |
||
| 135 | channelId int required ID of channel. |
||
| 136 | channelName str required Name of channel. |
||
| 137 | channelIcon str optioanl URL to an icon representative for the channel. |
||
| 138 | eventId int optional ID of the current (or next to be) event on this channel. |
||
| 139 | tags str[] required Tags this channel is mapped to. |
||
| 140 | }}} |
||
| 141 | |||
| 142 | 12 | Andreas Smas | ---- |
| 143 | 3 | Andreas Smas | === channelDelete === |
| 144 | 1 | Andreas Smas | |
| 145 | 11 | Andreas Smas | A channel has been deleted on the server. |
| 146 | 1 | Andreas Smas | |
| 147 | 11 | Andreas Smas | This message is only sent if session is in asynchronous mode. |
| 148 | |||
| 149 | Message fields: |
||
| 150 | {{{ |
||
| 151 | channelId int required ID of channel. |
||
| 152 | }}} |
||
| 153 | |||
| 154 | 12 | Andreas Smas | ---- |
| 155 | 1 | Andreas Smas | === tagAdd === |
| 156 | |||
| 157 | 11 | Andreas Smas | A new tag has been created on the server. |
| 158 | 1 | Andreas Smas | |
| 159 | 11 | Andreas Smas | This message is only sent if session is in asynchronous mode. |
| 160 | |||
| 161 | Message fields: |
||
| 162 | {{{ |
||
| 163 | tagId str required ID of tag. |
||
| 164 | tagName str required Name of tag. |
||
| 165 | tagIcon str optional URL to an icon representative for the channel. |
||
| 166 | channels int[] required Channels this tag is mapped to. |
||
| 167 | }}} |
||
| 168 | |||
| 169 | 12 | Andreas Smas | ---- |
| 170 | 1 | Andreas Smas | === tagUpdate === |
| 171 | |||
| 172 | 11 | Andreas Smas | A tag has been updated on the server. |
| 173 | 1 | Andreas Smas | |
| 174 | 11 | Andreas Smas | This message is only sent if session is in asynchronous mode. |
| 175 | |||
| 176 | Message fields: |
||
| 177 | {{{ |
||
| 178 | tagId str required ID of tag. |
||
| 179 | tagName str required Name of tag. |
||
| 180 | tagIcon str optional URL to an icon representative for the channel. |
||
| 181 | channels int[] required Channels this tag is mapped to. |
||
| 182 | }}} |
||
| 183 | |||
| 184 | 12 | Andreas Smas | ---- |
| 185 | 1 | Andreas Smas | === tagDelete === |
| 186 | |||
| 187 | 11 | Andreas Smas | A tag has been deleted from the server. |
| 188 | |||
| 189 | This message is only sent if session is in asynchronous mode. |
||
| 190 | 1 | Andreas Smas | |
| 191 | 11 | Andreas Smas | Message fields: |
| 192 | {{{ |
||
| 193 | 1 | Andreas Smas | tagId str required ID of tag. |
| 194 | 11 | Andreas Smas | }}} |
| 195 | |||
| 196 | 12 | Andreas Smas | ---- |
| 197 | 11 | Andreas Smas | === subscriptionStart === |
| 198 | 2 | Andreas Smas | |
| 199 | 12 | Andreas Smas | ---- |
| 200 | 2 | Andreas Smas | === subscriptionStop === |
| 201 | |||
| 202 | 12 | Andreas Smas | ---- |
| 203 | 2 | Andreas Smas | === subscriptionStatus === |
| 204 | |||
| 205 | 12 | Andreas Smas | ---- |
| 206 | 2 | Andreas Smas | === queueStatus === |