summaryrefslogtreecommitdiff
path: root/tubes/README
blob: e8e12fbef9982da7e67438c29b3076e85d98e996 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
* Interface to Telepathy Tubes.

The idea is to provide 1-1 collaboration between contacts and many-many
collaboration via MUCs, using Telepathy DBus Tubes over Jabber/XMPP.

First stab is at 1-1 contact channels, hopefully MUCs can be realized using
the same TeleConference abstraction.

To enable configure LibO with --enable-telepathy

Currently (2012-04-14) at least telepathy-glib 0.18 is needed, which doesn't
come with distributions. Download it from
http://telepathy.freedesktop.org/releases/telepathy-glib/
and make install it locally, e.g. with --prefix=$HOME/usr
For LibO configure then use PKG_CONFIG_PATH="$HOME/usr/lib/pkgconfig
To not have tubes and sc cppunittests stumble (LD_LIBRARY_PATH is not evaluated
in unit tests and thus not a solution) copy the libs to the solver, i.e.
cp -p $HOME/usr/lib/libtelepathy-glib.* $SRCDIR/solver/$INPATH/lib/

If you have a Telepathy-enabled LibreOffice installed to /usr (including
liboapprover) you may also want to install the .service and .client files to
make everything service-activatable:

    mkdir -p $HOME/.local/share/telepathy/clients
    ln -s $PWD/tubes/LibreOffice.client \
          $PWD/tubes/LibreOfficeApprover.client \
          $HOME/.local/share/telepathy/clients

    mkdir -p $HOME/.local/share/dbus-1/services
    ln -s $PWD/tubes/org.freedesktop.Telepathy.Client.LibreOfficeApprover.service \
          $PWD/tubes/org.freedesktop.Telepathy.Client.LibreOffice.service \
          $HOME/.local/share/dbus-1/services

Otherwise, you need to make sure liboapprover and a Telepathy-enabled
LibreOffice are running.


* Demo modes

This allows you to play with the interposing without having a telepathy
enabled setup:

    INTERCEPT=demo ./soffice -calc

Create a bit of a document, type 'saveas' with spelling auto-correction
disabled, and bingo.


* Status 2012-03-23:

* To do interesting things with this code build and run calc thus:

	SAL_LOG=1 LIBO_TUBES=slave ./soffice -calc   # user one
	SAL_LOG=1 LIBO_TUBES=master ./soffice -calc  # user two

	hope that a nasty race-condition doesn't occur during startup:
which is flagged by "we are supposed to handle only one channel" you
hit it: bang - just try again.

	you also require only a single jabber connection enabled (in
empathy) and to have your opponent added and approved on both sides.

	Now type simple strings into cells, rename sheets, or type
'saveme' to transfer your document as-is to the other side ...


* Status 2012-03-20:

* no LibO code depends on this module yet, so it is not built in a regular
  build, even if configured with --enable-telepathy, so cd tubes and make here
  * to enable the various SAL_INFO and SAL_WARN messages emitted during
    cppunittest pass SAL_LOG=... and do a debug build
  * SAL_LOG="+WARN+INFO.tubes" make -rs debug=true
  * the cppunittest will currently fail anyway (even if it wouldn't for other
    reasons), this is on purpose to be able to see the output as otherwise it
    is silenced down ... :-(

* for the cppunittest needed:
  * Configure two Jabber accounts in Empathy
  * Both must be online and on each other's contact list
  * Copy qa/test-config.ini.example to qa/test-config.ini, and specify those
    two accounts' JIDs in it.

* very nasty GMainLoop handling for cppunittest, HOPEFULLY we will get rid of
  that in a real LibO
* working:
  * contact channels are setup
  * tube is offered/accepted
  * packets are sent and received


TODO:

* cleanup code to use a refcounted single instance thats holds mpAccountManager
  and stuff and actually releases them, instead of statics
* TeleManager should be a single instance, not holding any account information;
  instead, the start...Session() methods should also get the account passed
* implement master/slave mode in 1-1 buddy conferences, master would do strong
  ordering


other TODOs:

* associate a document with a conference
  * use SfxObjectShell as an abstraction and broadcast incoming changes?
  * use UNO API?
  * first setup just to get something working could share a document
    accessible by all parties on a network share or some such
    * may need one master responsible to save the document
  * later document transfer will be needed, use Telepathy File Transfer
* dialog to pick own account
* dialog to pick contact or MUC to work with
* dialog to accept/reject collaboration requests


In applications, e.g. Calc:

* stricter model,view,controller
* disable all actions we cannot process collaboratively
* separate input from view
* preprocess input to determine data type (text, number, date, ...)
* send typed/categorized data over wire before actually processing in model
* process serialized input as received
* Calc specific:
  * use existing shared document feature with change-tracking enabled to
    visualize changes
    * may have the benefit of having already only a subset of trackable change
      actions available
  * let ScDocFunc handle also received changes
* have dialogs send their result item sets over the wire