Crossfire 0.3a7 Migration

From FirebugWiki

(Difference between revisions)
Jump to: navigation, search
m (setbreakpoint)
m (Replaced content with "#REDIRECT [https://github.com/firebug-crossfire/crossfire/wiki/Crossfire-0.3a6-to-0.3a7-migration 0.3a7 Migration on Github]")
 
(8 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.
+
-
 
+
-
== context_id ==
+
-
 
+
-
In an effort to make the protocol as consistent as possible the last remaining packet attribute has been camel-cased. The changes made are a protocol-wide rename of <code>context_id</code> to <code>contextId</code>.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue use of the <code>context_id</code> attribute in all [[Crossfire_Protocol_Reference#Request_Packets|request]], [[Crossfire_Protocol_Reference#Response_Packets|response]] and [[Crossfire_Protocol_Reference#Event_Packets|event]] packets and begin using the <code>contextId</code> attribute.
+
-
:
+
-
'''Details'''
+
-
:
+
-
No additional details.
+
-
 
+
-
== 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 request form:
+
-
<source lang="javascript">
+
-
Content-Length:78
+
-
\r\n\r\n
+
-
{
+
-
  "type":"request",
+
-
  "command":"continue",
+
-
  "contextId":"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 request form:
+
-
<source lang="javascript">
+
-
Content-Length:<content_length>
+
-
\r\n\r\n
+
-
{
+
-
  "command":"evaluate",
+
-
  "type":"request",
+
-
  "contextId":"xf0.3::3442767",
+
-
  "seq":21,
+
-
  "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",
+
-
  "contextId":"xf0.3::3442767",
+
-
  "seq":21,
+
-
  "request_seq":20,
+
-
  "body":{
+
-
          "result":{
+
-
                    "type":"number",
+
-
                    "value":7
+
-
                    }
+
-
        }
+
-
  "running":false,
+
-
  "success":true,
+
-
}
+
-
</source>
+
-
 
+
-
== frame ==
+
-
 
+
-
The <code>frame</code> [[Crossfire_Protocol_Reference#frame_2|request]] has been updated to accept the <code>index</code> argument.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue use of the <code>number</code> argument and begin using <code>index</code>.
+
-
:
+
-
'''Details'''
+
-
:
+
-
In pre-0.3a7 versions the request had the form:
+
-
<source lang="javascript">
+
-
Content-Length:120
+
-
\r\n\r\n
+
-
{
+
-
  "type":"request",
+
-
  "command":"frame",
+
-
  "contextId":"xf0.3::7322351",
+
-
  "seq":33,
+
-
  "arguments":{
+
-
                "number":0,
+
-
                "includeScopes":true
+
-
              },
+
-
}
+
-
\r\n
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the <code>number</code> argument has been renamed to <code>index</code>.
+
-
:
+
-
New request form:
+
-
<source lang="javascript">
+
-
Content-Length:120
+
-
\r\n\r\n
+
-
 
+
-
{
+
-
  "type":"request",
+
-
  "command":"frame",
+
-
  "contextId":"xf0.3::7322351",
+
-
  "seq":33,
+
-
  "arguments":{
+
-
                "index":0,
+
-
                "includeScopes":true
+
-
              },
+
-
}
+
-
\r\n
+
-
</source>
+
-
:
+
-
The response packet has not changed.
+
-
 
+
-
== getbreakpoints ==
+
-
 
+
-
The <code>getbreakpoints</code> [[Crossfire_Protocol_Reference#getbreakpoints|request]] has been updated to no longer accept the <code>contextId</code> argument and to return the new [[Crossfire_Protocol_Reference#breakpoint|breakpoint object]] form in the response.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue use of the <code>contextId</code> argument in the request and start using the new [[Crossfire_Protocol_Reference#breakpoint|breakpoint object]] form in the response.
+
-
:
+
-
'''Details'''
+
-
:
+
-
In pre-0.3a7 versions the request had the form:
+
-
<source lang="javascript">
+
-
Content-Length:84
+
-
\r\n\r\n
+
-
{
+
-
"type":"request",
+
-
"command":"getbreakpoints",
+
-
"contextId":"xf0.3::6179868",
+
-
"seq":12,
+
-
}
+
-
\r\n
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the <code>contextId</code> argument is no longer used
+
-
:
+
-
New request form:
+
-
<source lang="javascript">
+
-
Content-Length:54
+
-
\r\n\r\n
+
-
{
+
-
"type":"request",
+
-
"command":"getbreakpoints",
+
-
"seq":44
+
-
}
+
-
\r\n
+
-
</source>
+
-
:
+
-
:
+
-
In pre-0.3a7 versions the response had the form:
+
-
<source lang="javascript">
+
-
Content-Length:1366
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"getbreakpoints",
+
-
  "seq":46,
+
-
  "request_seq":45,
+
-
  "body":{
+
-
          "breakpoints":[{
+
-
                            "handle":7,
+
-
                            "type":"line",
+
-
                            "location":{
+
-
                                        "line":2,
+
-
                                        "url":"http://www.google.ca//event/seq/1"
+
-
                                      },
+
-
                            "enabled":true
+
-
                        }]
+
-
        },
+
-
  "running":true,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the response makes use of the new [[Crossfire_Protocol_Reference#breakpoint|breakpoint object]] form
+
-
:
+
-
New response form:
+
-
<source lang="javascript">
+
-
Content-Length:265
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"getbreakpoints",
+
-
  "seq":45,
+
-
  "request_seq":44,
+
-
  "body":{
+
-
          "breakpoints":[{
+
-
                            "handle":1,
+
-
                            "type":"line",
+
-
                            "location":{
+
-
                                        "line":2,
+
-
                                        "url":"http://www.google.ca//event/seq/1"
+
-
                                      },
+
-
                            "attributes":{
+
-
                                          "enabled":true,
+
-
                                          "condition":null
+
-
                                        }
+
-
                        }]
+
-
          },
+
-
  "running":true,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
 
+
-
== listcontexts ==
+
-
The <code>listcontexts</code> [[Crossfire_Protocol_Reference#listcontexts|request]] has been updated to rename the <code>href</code> body value to <code>url</code>.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue use of the <code>href</code> and <code>context_id</code> body values and begin using <code>url</code> and <code>contextId</code> respectively.
+
-
:
+
-
'''Details'''
+
-
The request packet has not changed.
+
-
:
+
-
In pre-0.3a7 versions the response had the form:
+
-
<source lang="javascript">
+
-
Content-Length:196
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"listcontexts",
+
-
  "seq":6,
+
-
  "request_seq":5,
+
-
  "body":{
+
-
          "contexts":[{"context_id":"xf0.3::5482594","href":"http://www.google.ca/","current":true}]
+
-
        },
+
-
  "running":true,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the <code>context_id</code> body value has been renamed to <code>contextId</code>.
+
-
*the <code>href</code> body value has been renamed to <code>url</code>.
+
-
:
+
-
New response form:
+
-
<source lang="javascript">
+
-
Content-Length:196
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"listcontexts",
+
-
  "seq":6,
+
-
  "request_seq":5,
+
-
  "body":{
+
-
          "contexts":[{"contextId":"xf0.3::5482594","url":"http://www.google.ca/","current":true}]
+
-
        },
+
-
  "running":true,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
 
+
-
== onBreak ==
+
-
The <code>onBreak</code> [[Crossfire_Protocol_Reference#onBreak|event]] has been updated to place location information in a new <code>location</code> body object and include a new <code>cause</code> body object.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue use of the <code>line</code> and <code>url</code> body values and begin using the <code>location</code> body object to find these values. Clients can also optionally begin using the <code>cause</code> body object to retrieve causal information about the event.
+
-
:
+
-
'''Details'''
+
-
:
+
-
In pre-0.3a7 versions the event had the form:
+
-
:
+
-
<source lang="javascript">
+
-
Content-Length:156
+
-
\r\n\r\n
+
-
{
+
-
  "seq":37,
+
-
  "type":"event",
+
-
  "event":"onBreak",
+
-
  "contextId":"xf0.3::5159616",
+
-
  "data":{
+
-
          "url":"http://www.google.ca//event/seq/1",
+
-
          "line":2
+
-
        }
+
-
}
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the <code>url</code> body value has been removed and placed in the <code>location</code> body object
+
-
*the <code>line</code> body value has been removed and placed in the <code>location</code> body object
+
-
*the new body object <code>location</code> has been added
+
-
*the new body object <code>cause</code> has been added
+
-
:
+
-
New event form:
+
-
<source lang="javascript">
+
-
Content-Length:156
+
-
\r\n\r\n
+
-
{
+
-
  "seq":37,
+
-
  "type":"event",
+
-
  "event":"onBreak",
+
-
  "contextId":"xf0.3::5159616",
+
-
  "data":{
+
-
          "location":{"url":"http://www.google.ca//event/seq/1","line":2},
+
-
          "cause":{}
+
-
        }
+
-
}
+
-
</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>oldUrl</code> and discontinue use of the <code>new_href</code> body value and begin using <code>url</code>. Lastly clients must begin using the new body values <code>contextId</code> and <code>oldContextId</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>oldUrl</code>
+
-
*the <code>new_href</code> body value has been replaced with <code>url</code>
+
-
*the new body value <code>contextId</code> has been added
+
-
*the new body value <code>oldContextId</code> has been added
+
-
:
+
-
New event form:
+
-
<source lang="javascript">
+
-
Content-Length:181
+
-
\r\n\r\n
+
-
{
+
-
  "type":"event"
+
-
  "event":"onContextSelected",
+
-
  "seq":19,
+
-
  "data":{
+
-
          "url":"http://www.google.ca/advanced_search?hl=en",
+
-
          "contextId":"xf0.3::9202767",
+
-
          "oldUrl":"http://www.ubuntulinux.org/",
+
-
          "oldContextId":"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",
+
-
"contextId":"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.
+
-
 
+
-
== scripts ==
+
-
 
+
-
The <code>scripts</code> [[Crossfire_Protocol_Reference#scripts|request]] has been updated to remove unnecessary nesting of JSON objects.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue use of the nested <code>script</code> entries in the response.
+
-
:
+
-
'''Details'''
+
-
:
+
-
The request packet has not changed.
+
-
:
+
-
In pre-0.3a7 versions the response had the following form:
+
-
<source lang="javascript">
+
-
Content-Length:78967
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"scripts",
+
-
  "contextId":"xf0.3::3788274",
+
-
  "seq":53,
+
-
  "request_seq":52,
+
-
  "body":{
+
-
          "scripts":[{"script":{
+
-
                                  "url":"http://www.mozilla.org/",
+
-
                                  "lineOffset":0,
+
-
                                  "columnOffset":0,
+
-
                                  "sourceLength":298,
+
-
                                  "lineCount":298,
+
-
                                  "type":"URLOnly",
+
-
                                  "source":"..."}
+
-
                      }},
+
-
                      {"script": {...}}
+
-
                    ]
+
-
        },
+
-
  "running":true,
+
-
  "success":true,
+
-
}
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the unnecessary <code>script</code> nesting has been removed from the JSON.
+
-
:
+
-
<source lang="javascript">
+
-
Content-Length:382
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"scripts",
+
-
  "contextId":"xf0.3::1171142",
+
-
  "seq":32,
+
-
  "request_seq":31,
+
-
  "body":{
+
-
          "scripts":[
+
-
                      {"url":"http://www.google.ca/","lineOffset":0,"columnOffset":0,"sourceLength":5,"lineCount":40,"type":"top-level"},               
+
-
                      {"url":"http://www.google.ca//event/seq/1","lineOffset":0,"columnOffset":0,"sourceLength":3,"lineCount":3,"type":"event"}
+
-
                    ]
+
-
        },
+
-
  "running":true,
+
-
  "success":true,
+
-
}
+
-
</source>
+
-
 
+
-
== scope ==
+
-
 
+
-
The <code>scope</code> [[Crossfire_Protocol_Reference#scope|request]] has been updated to accept the new <code>index</code> and <code>frameIndex</code> arguments as well as update the response body value <code>object</code> to <code>scope</code>.
+
-
:
+
-
This command has been updated in Crossfire version 0.3a7, please see the [[Crossfire_0.3a7_Migration#scope|migration guide entry]] for more information.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue use of the <code>number</code> and <code>frameNumber</code> arguments and also discontinue use of the <code>object</code> response body value and begin using <code>scope</code>.
+
-
:
+
-
'''Details'''
+
-
:
+
-
In pre-0.3a7 versions the request had the following form:
+
-
<source lang="javascript">
+
-
Content-Length:116
+
-
\r\n\r\n
+
-
{
+
-
  "type":"request",
+
-
  "command":"scope",
+
-
  "contextId":"xf0.3::6179868",
+
-
  "seq":20,
+
-
  "arguments":{
+
-
                "number":0,
+
-
                "frameNumber":0
+
-
              }
+
-
}
+
-
\r\n
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the <code>number</code> argument has been renamed to <code>index</code>
+
-
*the <code>frameNumber</code> argument has been renamed to <code>frameIndex</code>
+
-
:
+
-
<source lang="javascript">
+
-
Content-Length:116
+
-
\r\n\r\n
+
-
{
+
-
  "type":"request",
+
-
  "command":"scope",
+
-
  "contextId":"xf0.3::6179868",
+
-
  "seq":20,
+
-
  "arguments":{
+
-
                "index":0,
+
-
                "frameIndex":0
+
-
              }
+
-
}
+
-
\r\n
+
-
</source>
+
-
 
+
-
:
+
-
In pre-0.3a7 versions the response had the following form:
+
-
<source lang="javascript">
+
-
Content-Length:226
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"scope",
+
-
  "contextId":"xf0.3::6179868",
+
-
  "seq":21,
+
-
  "request_seq":20,
+
-
  "body":{
+
-
          "index":0,
+
-
          "frameIndex":0,
+
-
          "object":{"type":"ref","handle":"19"}
+
-
        },
+
-
  "running":false,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the <code>object</code> body value has been renamed to <code>scope</code>
+
-
:
+
-
<source lang="javascript">
+
-
Content-Length:226
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"scope",
+
-
  "contextId":"xf0.3::6179868",
+
-
  "seq":21,
+
-
  "request_seq":20,
+
-
  "body":{
+
-
          "index":0,
+
-
          "frameIndex":0,
+
-
          "scope":{"type":"ref","handle":"19"}
+
-
        },
+
-
  "running":false,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
 
+
-
== scopes ==
+
-
 
+
-
The <code>scopes</code> [[Crossfire_Protocol_Reference#scopes|request]] has been updated to accept the <code>frameIndex</code> argument as well as update the response body value to use the new <code>scope</code> object form.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue use of the <code>frameNumber</code> argument and discontinue use of the old <code>scope</code> object form. For more information on the new <code>scope</code> object shape, see the [[#scope|new scope request]] migration entry.
+
-
:
+
-
'''Details'''
+
-
:
+
-
In pre-0.3a7 versions the request had the following form:
+
-
<source lang="javascript">
+
-
Content-Length:106
+
-
\r\n\r\n
+
-
{
+
-
  "type":"request",
+
-
  "command":"scopes",
+
-
  "contextId":"xf0.3::6179868",
+
-
  "seq":16,
+
-
  "arguments":{
+
-
                "frameNumber":0
+
-
              }
+
-
}
+
-
\r\n
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the <code>frameNumber</code> argument has been renamed to <code>frameIndex</code>
+
-
:
+
-
<source lang="javascript">
+
-
Content-Length:106
+
-
\r\n\r\n
+
-
{
+
-
  "type":"request",
+
-
  "command":"scopes",
+
-
  "contextId":"xf0.3::6179868",
+
-
  "seq":16,
+
-
  "arguments":{
+
-
                "frameIndex":0
+
-
              }
+
-
}
+
-
\r\n
+
-
</source>
+
-
:
+
-
In pre-0.3a7 versions the response had the following form:
+
-
<source lang="javascript">
+
-
Content-Length:282
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"scopes",
+
-
  "contextId":"xf0.3::6179868",
+
-
  "seq":17,
+
-
  "request_seq":16,
+
-
  "body":{
+
-
          "fromScope":0,
+
-
          "toScope":1,
+
-
          "totalScopes":2,
+
-
          "scopes":[{
+
-
                      "number":0,
+
-
                      "frameNumber":0,
+
-
                      "object":{"type":"object","handle":19}
+
-
                    }]
+
-
        },
+
-
  "running":false,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*the <code>scopes</code> body value has an updated <code>scope</code> object.
+
-
:
+
-
<source lang="javascript">
+
-
Content-Length:282
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"scopes",
+
-
  "contextId":"xf0.3::6179868",
+
-
  "seq":17,
+
-
  "request_seq":16,
+
-
  "body":{
+
-
          "fromScope":0,
+
-
          "toScope":1,
+
-
          "totalScopes":2,
+
-
          "scopes":[{
+
-
                      "index":0,
+
-
                      "frameIndex":0,
+
-
                      "scope":{"type":"object","handle":19}
+
-
                    }]
+
-
        },
+
-
  "running":false,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
 
+
-
== setbreakpoint ==
+
-
 
+
-
The <code>setbreakpoint</code> [[Crossfire_Protocol_Reference#setbreakpoint|request]] has been updated to move all breakpoint attributes from the root of the arguments object to the <code>attributes</code> object argument.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue placing breakpoint attributes in the root of the arguments object and instead place them in the <code>attributes</code> object argument.
+
-
:
+
-
'''Details'''
+
-
:
+
-
In pre-0.3a7 versions the request had the following form:
+
-
<source lang="javascript">
+
-
Content-Length:196
+
-
\r\n\r\n
+
-
{
+
-
  "type":"request",
+
-
  "command":"setbreakpoint",
+
-
  "seq":42,
+
-
  "arguments":{
+
-
                "enabled":true,
+
-
                "type":"line"
+
-
                "condition":null,
+
-
                "location":{
+
-
                            "line":2,
+
-
                            "url":"http:\/\/www.google.ca\/\/event\/seq\/1"
+
-
                          }
+
-
              }
+
-
}
+
-
\r\n
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*all attributes are now placed in the <code>attributes</code> object argument
+
-
:
+
-
<source lang="javascript">
+
-
Content-Length:210
+
-
\r\n\r\n
+
-
{
+
-
  "type":"request",
+
-
  "command":"setbreakpoint",
+
-
  "seq":42,
+
-
  "arguments":{
+
-
                "type":"line",
+
-
                "location":{
+
-
                            "line":2,
+
-
                            "url":"http:\/\/www.google.ca\/\/event\/seq\/1"
+
-
                          },
+
-
                "attributes":{
+
-
                              "enabled":true
+
-
                              "condition":null
+
-
                            }
+
-
              }
+
-
}
+
-
\r\n
+
-
</source>
+
-
:
+
-
In pre-0.3a7 versions the response had the following form:
+
-
<source lang="javascript">
+
-
Content-Length:230
+
-
\r\n\r\n
+
-
{
+
-
  "seq":44,
+
-
  "type":"response",
+
-
  "command":"setbreakpoint",
+
-
  "request_seq":42,
+
-
  "body":{
+
-
          "breakpoint":{
+
-
                          "handle":7,
+
-
                          "type":"line",
+
-
                          "enabled":true,
+
-
                          "location":{
+
-
                                      "line":2,
+
-
                                      "url":"http://www.google.ca//event/seq/1"
+
-
                                    }
+
-
                        }
+
-
        },
+
-
  "running":false,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
:
+
-
The following has changed:
+
-
*all attributes are now found in the <code>attributes</code> body object
+
-
:
+
-
<source lang="javascript">
+
-
Content-Length:244
+
-
\r\n\r\n
+
-
{
+
-
  "type":"response",
+
-
  "command":"setbreakpoint",
+
-
  "seq":44,
+
-
  "request_seq":42,
+
-
  "body":{
+
-
          "breakpoint":{
+
-
                          "handle":1,
+
-
                          "type":"line",
+
-
                          "location":{
+
-
                                      "line":2,
+
-
                                      "url":"http://www.google.ca//event/seq/1"
+
-
                                    },
+
-
                          "attributes":{
+
-
                                        "enabled":true
+
-
                                      }
+
-
                        }
+
-
        },
+
-
  "running":true,
+
-
  "success":true
+
-
}
+
-
</source>
+
-
 
+
-
== source ==
+
-
The <code>source</code> request has been removed. The results of the request are the same as using the [[Crossfire_Protocol_Reference#script_2|script request]] specifying the <code>includeSource</code> argument set to <code>true</code>.
+
-
:
+
-
'''Action Required'''
+
-
:
+
-
Clients must discontinue use of the <code>source</code> request and begin using the [[Crossfire_Protocol_Reference#script_2|script request]] with the <code>includeSource</code> argument set to <code>true</code>.
+
-
:
+
-
'''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]]
+

Latest revision as of 03:04, 15 May 2012

  1. REDIRECT 0.3a7 Migration on Github
Personal tools