Topic: Creating a Flingo-enabled device

Man, something just ain't clicking.  Maybe I'm not supposed to be doing this, but I am trying to create a flingo-enabled device.  This device sits on the inside of my firewall.  It does an "announce".  A subsequent discovery returns:

          'devices' => [
                           'make' => 'G2',
                           'services' => [
                                             'version' => '0.1',
                                             'name' => 'Media Player',
                                             'private_ip' => [
                                             'service' => 'flingo',
                                             'description' => 'This is the G2 Airplay device',
                                             't' => 1340747815
                           'model_id' => '',
                           'name' => 'OpenWrt',
                           'model' => 'WAN Board',
                           'description' => 'G2 is a board',
                           'platform' => '',
                           'guid' => 'DCB39C37-7EF3-39C9-ADAB-D9D77C5F73C5',
                           't' => 1340747815

My device then does a longpoll:

POST http://flingo.tv:80/fling/longpoll
User-Agent: Mozilla/5.0 (Linux; U; Android 3.1; en-us; GT-P7310 Build/HMJ37) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13
Content-Length: 41
Content-Type: application/x-www-form-urlencoded


While this is waiting, I run the CommandLine flingo.py:

./flingo.py ~/Documents/bfs-v-cfs_groves-knockel-schulte.pdf
fling bfs-v-cfs_groves-knockel-schulte.pdf from port 22107 with title
title: bfs-v-cfs_groves-knockel-schulte
description: Flung across local network from machine with name bahamut at ip address
url: … chulte.pdf
fling_url: http://flingo.tv/fling/fling?title=bfs- … front=True
result: "Flung to 2 services"

My longpoll returns:

HTTP/1.1 200 OK
Cache-Control: no-cache
Connection: close
Date: Tue, 26 Jun 2012 22:48:56 GMT
Pragma: no-cache
Server: gunicorn/0.14.2
Content-Length: 45
Content-Type: application/json-rpc; charset=utf-8
Client-Date: Tue, 26 Jun 2012 22:48:54 GMT
Client-Response-Num: 1
X-Message-Id: 1ccb83c4-bfe1-11e1-a6a4-047d7b3b2e41
X-Service: flingo

{"params": null, "method": "update", "id": 0}

Now what?  Its not clear to me from the online doc.  I cannot grok what the state machine ought to be on the fling-enabled device side.  My device is not in a sandbox (not in a browser).  Right now its perl code, as I am trying to understand the whole flingo process.


Re: Creating a Flingo-enabled device

Just posted API reference documentation for queue, move_queue, and remove_queue.  I also expanded the description of longpoll to take into account update.

I had previously not posted these because I was not satisfied with their semantics, but most my issues have since been resolved.

See http://flingo.org/developers.html#queue
See http://flingo.org/developers.html#move_queue
See http://flingo.org/developers.html#remove_queue