Sharing a document to a infinote server

2 views
Skip to first unread message

Børre

unread,
Jun 10, 2009, 6:23:59 AM6/10/09
to Kobby
Hi!

When opening a local document in gobby, you are asked to share it to
an infinote server.

As far as I understand there is no way to share a locally opened
document to an infinote server in kobby right now. I would like to try
to implement this feature, but need some advice on which functions or
classes I could use to "send" the contents of a document to the
infinote server.

Does anybody have any advice on this?

regards,
Børre Gaup

Gregory Haynes

unread,
Jun 11, 2009, 3:28:58 PM6/11/09
to ko...@googlegroups.com
Sounds like an awesome idea.

It looks like the way to push a document onto the infinote user is by using the
infc_browser_add_note_with_content method. I dont think I have wrapped this
method in QInfinity::Browser but it should only be a couple-liner.

On the Kobby side you should only need to read the document as a QString and
send the data through this method, from there the session-subscribe code
should handle the rest. Some modifications will probably need to be made to
DocumentBuilder, mabye add an 'insert_into_model' parameter which will keep
the created document from being added to the view before we send it over the
network.

--
Gregory Haynes

Gregory Haynes

unread,
Jun 11, 2009, 5:16:37 PM6/11/09
to ko...@googlegroups.com
I just added an addNoteWithContent method to QInfinity::Browser. Apparently
the libinfinity-0.3 API accepts a session for this (which is probably a lot
better for non-text plugins), so the added method does the same. Sorry for
the wrong info.

--
Gregory Haynes

Børre

unread,
Jun 15, 2009, 8:25:16 AM6/15/09
to Kobby
I had a look at how slotNewDocument ( in remotebrowserview.[h|cpp] )
was implemented.
It calls QInfinity::BrowserModel::createNote, which then calls
QInfinity::Browser::addNote.

Compared to Browser::addNote, Browser::addNoteWithContent needs an
additional Session, and I don't understand how that should be
constructed. Any tips on that?

--
Børre Gaup

Gregory Haynes

unread,
Jun 22, 2009, 3:49:36 PM6/22/09
to ko...@googlegroups.com

Sorry for the slow reply, I was on vacation the past week. You should be able
to construct a session using the NotePlugin wrapper in the Kobby source (which
is how libinfinity construct sessions). Let me know if you get stuck with this
and ill try to point you in the right direction.

>
> --

Reply all
Reply to author
Forward
0 new messages