|
|
| (41 intermediate revisions not shown) |
| Line 1: |
Line 1: |
| - | == Crossfire 0.3a7 Migration Guide ==
| + | #REDIRECT [https://github.com/firebug-crossfire/crossfire/wiki/Crossfire-0.3a6-to-0.3a7-migration 0.3a7 Migration on Github] |
| - | | + | |
| - | During 0.3a7 development there was a lot of work done to make the protocol more consistent and coherent, as expected, this work brought with it many changes to the protocol and a few changes that are no longer compatible with existing versions of Crossfire.
| + | |
| - | This guide will help ease the transition from using a pre-0.3a7 version of Crossfire, with each affected protocol entity described in its own following section.
| + | |
| - | | + | |
| - | == continue ==
| + | |
| - | | + | |
| - | The <code>continue</code> [[Crossfire_Protocol_Reference#continue|request]] has been updated to accept the <code>stepAction</code> argument.
| + | |
| - | :
| + | |
| - | '''Action Required'''
| + | |
| - | :
| + | |
| - | Clients must discontinue use of the <code>stepaction</code> argument and begin using <code>stepAction</code>.
| + | |
| - | :
| + | |
| - | '''Details'''
| + | |
| - | :
| + | |
| - | In pre-0.3a7 versions the request had the form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:78
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"request",
| + | |
| - | "command":"continue",
| + | |
| - | "context_id":"xf0.3::2777681",
| + | |
| - | "seq":87,
| + | |
| - | "arguments": {
| + | |
| - | "stepaction":"in"
| + | |
| - | }
| + | |
| - | }
| + | |
| - | \r\n
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The following has changed:
| + | |
| - | *the <code>stepaction</code> argument has been renamed to <code>stepAction</code>.
| + | |
| - | :
| + | |
| - | New response form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:78
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"request",
| + | |
| - | "command":"continue",
| + | |
| - | "context_id":"xf0.3::2777681",
| + | |
| - | "seq":87,
| + | |
| - | "arguments": {
| + | |
| - | "stepAction":"in"
| + | |
| - | }
| + | |
| - | }
| + | |
| - | \r\n
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The response packet has not changed.
| + | |
| - | | + | |
| - | == evaluate ==
| + | |
| - | | + | |
| - | The <code>evaluate</code> [[Crossfire_Protocol_Reference#evaluate|request]] has been updated to accept the <code>frameIndex</code> argument and serialize all results.
| + | |
| - | :
| + | |
| - | '''Action Required'''
| + | |
| - | : | + | |
| - | Clients must discontinue use of the <code>frame</code> argument and begin using <code>frameIndex</code>. Clients can also know what kind of values have been returned because
| + | |
| - | all values are no properly serialized as outlined in the [[Crossfire_Protocol_Reference#Types|protocol specification]].
| + | |
| - | :
| + | |
| - | '''Details'''
| + | |
| - | :
| + | |
| - | In pre-0.3a7 versions the request had the form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:<content_length>
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "command":"evaluate",
| + | |
| - | "type":"request",
| + | |
| - | "context_id":"xf0.3::3442767",
| + | |
| - | "seq":20,
| + | |
| - | "arguments":{
| + | |
| - | "expression":"3+4",
| + | |
| - | "frame":0
| + | |
| - | }
| + | |
| - | }
| + | |
| - | \r\n
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The following has changed:
| + | |
| - | *the <code>frame</code> argument has been renamed to <code>frameIndex</code>.
| + | |
| - | :
| + | |
| - | New response form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:<content_length>
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "command":"evaluate",
| + | |
| - | "type":"request",
| + | |
| - | "context_id":"xf0.3::3442767",
| + | |
| - | "seq":20,
| + | |
| - | "arguments":{
| + | |
| - | "expression":"3+4",
| + | |
| - | "frameIndex":0
| + | |
| - | }
| + | |
| - | }
| + | |
| - | \r\n
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | In pre-0.3a7 versions the response had the following form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:177
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "command":"evaluate",
| + | |
| - | "type":"response",
| + | |
| - | "context_id":"xf0.3::3442767",
| + | |
| - | "seq":21,
| + | |
| - | "request_seq":20,
| + | |
| - | "body":{
| + | |
| - | "result":7
| + | |
| - | }
| + | |
| - | "running":false,
| + | |
| - | "success":true,
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The following has changed:
| + | |
| - | *all response values are serialized.
| + | |
| - | :
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:177
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "command":"evaluate",
| + | |
| - | "type":"response",
| + | |
| - | "context_id":"xf0.3::3442767",
| + | |
| - | "seq":21,
| + | |
| - | "request_seq":20,
| + | |
| - | "body":{
| + | |
| - | "result":{
| + | |
| - | "type":"number",
| + | |
| - | "value":7
| + | |
| - | }
| + | |
| - | }
| + | |
| - | "running":false,
| + | |
| - | "success":true,
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | | + | |
| - | == onContextChanged ==
| + | |
| - | | + | |
| - | The <code>onContextChanged</code> [[Crossfire_Protocol_Reference#onContextSelected|event]] has been renamed to <code>onContextSelected</code> and the body values have been updated: <code>href</code> to <code>url</code> and <code>new_href</code> to <code>newUrl</code>. The event also has no root <code>context_id</code> entry and the body has two additional values <code>contextId</code> and <code>newContextId</code>.
| + | |
| - | :
| + | |
| - | '''Action Required'''
| + | |
| - | :
| + | |
| - | Clients must discontinue use of the <code>onContextChanged</code> event name and begin using <code>onContextSelected</code>.
| + | |
| - | Clients also must discontinue use of the <code>href</code> body value and begin using <code>url</code> and discontinue use of the <code>new_href</code> body value and begin using <code>newUrl</code>. Lastly clients must begin using the new body values <code>contextId</code> and <code>newContextId</code>.
| + | |
| - | :
| + | |
| - | '''Details'''
| + | |
| - | :
| + | |
| - | In pre-0.3a7 versions the event had the form:
| + | |
| - | :
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:181
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event"
| + | |
| - | "event":"onContextChanged",
| + | |
| - | "context_id":"xf0.3::8127619",
| + | |
| - | "seq":19,
| + | |
| - | "data":{
| + | |
| - | "new_href":"http://www.google.ca/advanced_search?hl=en",
| + | |
| - | "href":"http://www.ubuntulinux.org/"
| + | |
| - | },
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The following has changed:
| + | |
| - | *the event has been renamed from <code>onContextChanged</code> to <code>onContextSelected</code>
| + | |
| - | *the <code>href</code> body value has been replaced with <code>url</code>
| + | |
| - | *the <code>new_href</code> body value has been replaced with <code>newUrl</code>
| + | |
| - | *the new body value <code>contextId</code> has been added
| + | |
| - | *the new body value <code>newContextId</code> has been added
| + | |
| - | :
| + | |
| - | New event form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:181
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event"
| + | |
| - | "event":"onContextSelected",
| + | |
| - | "seq":19,
| + | |
| - | "data":{
| + | |
| - | "newUrl":"http://www.google.ca/advanced_search?hl=en",
| + | |
| - | "newContextId":"xf0.3::9202767",
| + | |
| - | "url":"http://www.ubuntulinux.org/",
| + | |
| - | "contextId":"xf0.3::9202766"
| + | |
| - | },
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | | + | |
| - | == onContextCreated ==
| + | |
| - | | + | |
| - | The <code>onContextCreated</code> [[Crossfire_Protocol_Reference#onContextCreated|event]] has been updated to change the name of the <code>href</code> body value to <code>url</code> and remove the <code>context_id</code> attribute from the root of the packet and add a new <code>contextId</code> value to the body.
| + | |
| - | :
| + | |
| - | '''Action Required'''
| + | |
| - | :
| + | |
| - | Clients must discontinue use of the <code>href</code> body value and begin using <code>url</code>, as well as discontinue use of the <code>context_id</code> in the root of the packet and being using the <code>contextId</code> value in the body.
| + | |
| - | :
| + | |
| - | '''Details'''
| + | |
| - | :
| + | |
| - | In pre-0.3a7 versions the event had the form:
| + | |
| - | :
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:142
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event",
| + | |
| - | "event":"onContextCreated",
| + | |
| - | "context_id":"xf0.3::558234",
| + | |
| - | "seq":19,
| + | |
| - | "body":{
| + | |
| - | "href":"http://www.mozilla.com/en-US/firefox/central/"
| + | |
| - | },
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The following has changed:
| + | |
| - | *the <code>href</code> body value has been replaced with <code>url</code>
| + | |
| - | *the <code>context_id</code> has been removed from the root of the event packet
| + | |
| - | *the <code>contextId</code> value has been added
| + | |
| - | :
| + | |
| - | New event form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:142
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event",
| + | |
| - | "event":"onContextCreated",
| + | |
| - | "seq":19,
| + | |
| - | "body":{
| + | |
| - | "url":"http://www.mozilla.com/en-US/firefox/central/",
| + | |
| - | "contextId":"xf0.3::6985855"
| + | |
| - | },
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | | + | |
| - | == onContextDestroyed ==
| + | |
| - | | + | |
| - | The <code>onContextDestroyed</code> [[Crossfire_Protocol_Reference#onContextDestroyed|event]] has been updated to remove the root <code>context_id</code> entry and place it in the <code>newContextId</code> body value.
| + | |
| - | :
| + | |
| - | '''Action Required'''
| + | |
| - | :
| + | |
| - | Clients must discontinue using the <code>context_id</code> attribute from the root of the packet and begin using the new body value <code>contextId</code>.
| + | |
| - | :
| + | |
| - | '''Details'''
| + | |
| - | :
| + | |
| - | In pre-0.3a7 versions the event had the form:
| + | |
| - | :
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:75
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event",
| + | |
| - | "event":"onContextDestroyed",
| + | |
| - | "context_id":"xf0.3::8127624",
| + | |
| - | "seq":6
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The following has changed:
| + | |
| - | *the new body value <code>contextId</code> has been added
| + | |
| - | *the new body value <code>newContextId</code> has been added
| + | |
| - | :
| + | |
| - | New event form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:91
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event",
| + | |
| - | "event":"onContextDestroyed",
| + | |
| - | "seq":6,
| + | |
| - | "data":{
| + | |
| - | "contextId":"xf0.3::2075594"
| + | |
| - | }
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | | + | |
| - | == onContextLoaded ==
| + | |
| - | | + | |
| - | The <code>onContextLoaded</code> [[Crossfire_Protocol_Reference#onContextLoaded|event]] has been updated to change the name of the <code>href</code> body value to <code>url</code> and to remove the <code>context_id</code> from the root of the event and place it in the body using the new <code>contextId</code> value.
| + | |
| - | :
| + | |
| - | '''Action Required'''
| + | |
| - | :
| + | |
| - | Clients must discontinue use of the <code>href</code> body value and begin using <code>url</code> and discontinue use of the <code>context_id</code> in the root of the event and being using the <code>contextId</code> body value.
| + | |
| - | :
| + | |
| - | '''Details'''
| + | |
| - | :
| + | |
| - | In pre-0.3a7 versions the event had the form:
| + | |
| - | :
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:142
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event",
| + | |
| - | "event":"onContextLoaded",
| + | |
| - | "context_id":"xf0.3::558234",
| + | |
| - | "seq":19,
| + | |
| - | "body":{
| + | |
| - | "href":"http://www.mozilla.com/en-US/firefox/central/"
| + | |
| - | },
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The following has changed:
| + | |
| - | *the <code>href</code> body value has been replaced with <code>url</code>
| + | |
| - | *the root <code>context_id</code> has been removed
| + | |
| - | *the new body value <code>contextId</code> has been added
| + | |
| - | :
| + | |
| - | New event form:
| + | |
| - | :
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:141
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event",
| + | |
| - | "event":"onContextLoaded",
| + | |
| - | "seq":19,
| + | |
| - | "data":{
| + | |
| - | "url":"http://www.mozilla.com/en-US/firefox/central/"
| + | |
| - | "contextId":"xf0.3::6985855"
| + | |
| - | },
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | | + | |
| - | == onToggleBreakpoint ==
| + | |
| - | The <code>onToggleBreakpoint</code> event has been updated to supply the complete [[Crossfire_Protocol_Reference#breakpoint|breakpoint object]] in the data section.
| + | |
| - | :
| + | |
| - | '''Action Required'''
| + | |
| - | :
| + | |
| - | Clients must discontinue using the <code>location</code> and <code>handle</code> body values and begin using the <code>breakpoint</code> value.
| + | |
| - | :
| + | |
| - | '''Details'''
| + | |
| - | :
| + | |
| - | In pre-0.3a7 versions the event had the form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:150
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event",
| + | |
| - | "event":"onToggleBreakpoint",
| + | |
| - | "context_id":"xf0.3::2531266",
| + | |
| - | "seq":26,
| + | |
| - | "data":{
| + | |
| - | "handle":4,
| + | |
| - | "set":false,
| + | |
| - | "location":{
| + | |
| - | "line":2,
| + | |
| - | "url":"http://www.google.ca//event/seq/1"
| + | |
| - | }
| + | |
| - | }
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The following has changed:
| + | |
| - | *the <code>handle</code> body value has been removed
| + | |
| - | *the <code>location</code> body value has been removed
| + | |
| - | *the <code>breakpoint</code> body value has been added
| + | |
| - | :
| + | |
| - | New event form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:255
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"event",
| + | |
| - | "event":"onToggleBreakpoint",
| + | |
| - | "context_id":"xf0.3::5524167",
| + | |
| - | "seq":14,
| + | |
| - | "data":{
| + | |
| - | "breakpoint":{
| + | |
| - | "handle":3,
| + | |
| - | "type":"line",
| + | |
| - | "location":{"line":2,"url":"http://www.google.ca//event/seq/1"},
| + | |
| - | "attributes":{"enabled":true,"condition":null}
| + | |
| - | },
| + | |
| - | "set":true
| + | |
| - | }
| + | |
| - | }
| + | |
| - | </source>
| + | |
| - | | + | |
| - | == onToggleDOMBreakpoint ==
| + | |
| - | The <code>onToggleDOMBreakpoint</code> event has been removed. The event has been merged with <code>onToggleBreakpoint</code>.
| + | |
| - | :
| + | |
| - | '''Action Required'''
| + | |
| - | :
| + | |
| - | Clients must discontinue use of the <code>onToggleDOMBreakpoint</code> event and listen for an <code>onToggleBreakpoint</code> event in its place.
| + | |
| - | :
| + | |
| - | '''Details'''
| + | |
| - | :
| + | |
| - | There are no further details.
| + | |
| - | | + | |
| - | == updatecontext ==
| + | |
| - | | + | |
| - | The <code>updatecontext</code> [[Crossfire_Protocol_Reference#createcontext|request]] has been renamed to better reflect what it actually does. The new name of the request
| + | |
| - | is <code>createcontext</code>.
| + | |
| - | :
| + | |
| - | Aside from the rename of the request, two other changes have been made:
| + | |
| - | | + | |
| - | :
| + | |
| - | '''Action Required'''
| + | |
| - | :
| + | |
| - | Clients must discontinue use of the <code>updatecontext</code> request and begin using <code>createcontext</code>, and must begin using the new <code>url</code> argument. Clients must also note the change in location of the <code>context_id</code> optional argument in the packet.
| + | |
| - | :
| + | |
| - | '''Details'''
| + | |
| - | :
| + | |
| - | In pre-0.3a7 version the request had the form:
| + | |
| - | :
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:47
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"request"
| + | |
| - | "command":"updatecontext",
| + | |
| - | "seq": 22,
| + | |
| - | "context_id":"xf0.1a::9931113",
| + | |
| - | "arguments": {
| + | |
| - | "href": "http://collinsmichaelg.com"
| + | |
| - | }
| + | |
| - | }
| + | |
| - | \r\n
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The following has changed:
| + | |
| - | *the <code>href</code> argument has been replaced with <code>url</code>
| + | |
| - | *the <code>context_id</code> argument has been moved into the <code>arguments</code> object
| + | |
| - | *the <code>context_id</code> argument has been renamed to <code>contextId</code>
| + | |
| - | :
| + | |
| - | New request form:
| + | |
| - | <source lang="javascript">
| + | |
| - | Content-Length:47
| + | |
| - | \r\n\r\n
| + | |
| - | {
| + | |
| - | "type":"request"
| + | |
| - | "command":"createcontext",
| + | |
| - | "seq": 22,
| + | |
| - | "arguments": {
| + | |
| - | "contextId":"xf0.1a::9931113",
| + | |
| - | "url": "http://collinsmichaelg.com"
| + | |
| - | }
| + | |
| - | }
| + | |
| - | \r\n
| + | |
| - | </source>
| + | |
| - | :
| + | |
| - | The response packet has not changed.
| + | |
| - | [[Category:Crossfire]]
| + | |