Crossfire 0.3a7 Migration
From FirebugWiki
m (→context_id) |
m (→context_id) |
||
| Line 8: | Line 8: | ||
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>. | 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> in all [[Crossfire_Protocol_Reference#Request_Packets|request]], [[Crossfire_Protocol_Reference#Response_Packets|response]] and [[Crossfire_Protocol_Reference#Event_Packets|event]] packets. | Clients must discontinue use of the <code>context_id</code> in all [[Crossfire_Protocol_Reference#Request_Packets|request]], [[Crossfire_Protocol_Reference#Response_Packets|response]] and [[Crossfire_Protocol_Reference#Event_Packets|event]] packets. | ||
Revision as of 16:52, 2 June 2011
Contents |
Crossfire 0.3a7 Migration Guide
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 context_id to contextId.
Action Required
Clients must discontinue use of the context_id in all request, response and event packets.
Details
No additional details.
continue
The continue request has been updated to accept the stepAction argument.
Action Required
Clients must discontinue use of the stepaction argument and begin using stepAction.
Details
In pre-0.3a7 versions the request had the form:
Content-Length:78 \r\n\r\n { "type":"request", "command":"continue", "context_id":"xf0.3::2777681", "seq":87, "arguments": { "stepaction":"in" } } \r\n
The following has changed:
- the
stepactionargument has been renamed tostepAction.
New response form:
Content-Length:78 \r\n\r\n { "type":"response", "command":"continue", "context_id":"xf0.3::2777681", "seq":87, "response_seq":90 "arguments": { "stepAction":"in" } "running":false, "success":true, } \r\n
The response packet has not changed.
evaluate
The evaluate request has been updated to accept the frameIndex argument and serialize all results.
Action Required
Clients must discontinue use of the frame argument and begin using frameIndex. Clients can also know what kind of values have been returned because
all values are no properly serialized as outlined in the protocol specification.
Details
In pre-0.3a7 versions the request had the form:
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
The following has changed:
- the
frameargument has been renamed toframeIndex.
New request form:
Content-Length:<content_length> \r\n\r\n { "command":"evaluate", "type":"request", "context_id":"xf0.3::3442767", "seq":21, "arguments":{ "expression":"3+4", "frameIndex":0 } } \r\n
In pre-0.3a7 versions the response had the following form:
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, }
The following has changed:
- all response values are serialized.
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, }
onContextChanged
The onContextChanged event has been renamed to onContextSelected and the body values have been updated: href to url and new_href to newUrl. The event also has no root context_id entry and the body has two additional values contextId and newContextId.
Action Required
Clients must discontinue use of the onContextChanged event name and begin using onContextSelected.
Clients also must discontinue use of the href body value and begin using url and discontinue use of the new_href body value and begin using newUrl. Lastly clients must begin using the new body values contextId and newContextId.
Details
In pre-0.3a7 versions the event had the form:
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/" }, }
The following has changed:
- the event has been renamed from
onContextChangedtoonContextSelected - the
hrefbody value has been replaced withurl - the
new_hrefbody value has been replaced withnewUrl - the new body value
contextIdhas been added - the new body value
newContextIdhas been added
New event form:
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" }, }
onContextCreated
The onContextCreated event has been updated to change the name of the href body value to url and remove the context_id attribute from the root of the packet and add a new contextId value to the body.
Action Required
Clients must discontinue use of the href body value and begin using url, as well as discontinue use of the context_id in the root of the packet and being using the contextId value in the body.
Details
In pre-0.3a7 versions the event had the form:
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/" }, }
The following has changed:
- the
hrefbody value has been replaced withurl - the
context_idhas been removed from the root of the event packet - the
contextIdvalue has been added
New event form:
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" }, }
onContextDestroyed
The onContextDestroyed event has been updated to remove the root context_id entry and place it in the newContextId body value.
Action Required
Clients must discontinue using the context_id attribute from the root of the packet and begin using the new body value contextId.
Details
In pre-0.3a7 versions the event had the form:
Content-Length:75 \r\n\r\n { "type":"event", "event":"onContextDestroyed", "context_id":"xf0.3::8127624", "seq":6 }
The following has changed:
- the new body value
contextIdhas been added - the new body value
newContextIdhas been added
New event form:
Content-Length:91 \r\n\r\n { "type":"event", "event":"onContextDestroyed", "seq":6, "data":{ "contextId":"xf0.3::2075594" } }
onContextLoaded
The onContextLoaded event has been updated to change the name of the href body value to url and to remove the context_id from the root of the event and place it in the body using the new contextId value.
Action Required
Clients must discontinue use of the href body value and begin using url and discontinue use of the context_id in the root of the event and being using the contextId body value.
Details
In pre-0.3a7 versions the event had the form:
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/" }, }
The following has changed:
- the
hrefbody value has been replaced withurl - the root
context_idhas been removed - the new body value
contextIdhas been added
New event form:
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" }, }
onToggleBreakpoint
The onToggleBreakpoint event has been updated to supply the complete breakpoint object in the data section.
Action Required
Clients must discontinue using the location and handle body values and begin using the breakpoint value.
Details
In pre-0.3a7 versions the event had the form:
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" } } }
The following has changed:
- the
handlebody value has been removed - the
locationbody value has been removed - the
breakpointbody value has been added
New event form:
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 } }
onToggleDOMBreakpoint
The onToggleDOMBreakpoint event has been removed. The event has been merged with onToggleBreakpoint.
Action Required
Clients must discontinue use of the onToggleDOMBreakpoint event and listen for an onToggleBreakpoint event in its place.
Details
There are no further details.
updatecontext
The updatecontext request has been renamed to better reflect what it actually does. The new name of the request
is createcontext.
Aside from the rename of the request, two other changes have been made:
Action Required
Clients must discontinue use of the updatecontext request and begin using createcontext, and must begin using the new url argument. Clients must also note the change in location of the context_id optional argument in the packet.
Details
In pre-0.3a7 version the request had the form:
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
The following has changed:
- the
hrefargument has been replaced withurl - the
context_idargument has been moved into theargumentsobject - the
context_idargument has been renamed tocontextId
New request form:
Content-Length:47 \r\n\r\n { "type":"request" "command":"createcontext", "seq": 22, "arguments": { "contextId":"xf0.1a::9931113", "url": "http://collinsmichaelg.com" } } \r\n
The response packet has not changed.