|
Revision 3691, 1.1 KB
(checked in by bricks, 7 weeks ago)
|
|
Updated exmaple-format-plugin for current trunk
|
| Line | |
|---|
| 1 | Hi, |
|---|
| 2 | |
|---|
| 3 | so you are interested in writing a plugin for the |
|---|
| 4 | OpenSync synchronization framework... Great! :) |
|---|
| 5 | |
|---|
| 6 | Here is what you have to do: |
|---|
| 7 | |
|---|
| 8 | Edit the files |
|---|
| 9 | |
|---|
| 10 | AUTHORS |
|---|
| 11 | INSTALL |
|---|
| 12 | LICENSE |
|---|
| 13 | |
|---|
| 14 | and fill in the required information. Then edit: |
|---|
| 15 | |
|---|
| 16 | CMakeLists.txt |
|---|
| 17 | |
|---|
| 18 | and add any checks, dependencies (FIND_PACKAGE(...) statements), etc that you need for you plugin |
|---|
| 19 | to function. |
|---|
| 20 | |
|---|
| 21 | Then go to src/ and edit: |
|---|
| 22 | |
|---|
| 23 | CMakeLists.txt |
|---|
| 24 | |
|---|
| 25 | there to suit your needs and include the necessary library paths. Afterwards take a look at the example |
|---|
| 26 | source files of the sync plugin |
|---|
| 27 | |
|---|
| 28 | plugin.c |
|---|
| 29 | plugin.h |
|---|
| 30 | |
|---|
| 31 | and start writing the functions you need to connect, read and write |
|---|
| 32 | etc to your device. |
|---|
| 33 | |
|---|
| 34 | Then edit the default config file which must be the same name |
|---|
| 35 | as your plugin: |
|---|
| 36 | |
|---|
| 37 | plugin-name |
|---|
| 38 | |
|---|
| 39 | if you need to write a format plugin take a look at |
|---|
| 40 | |
|---|
| 41 | format.c |
|---|
| 42 | |
|---|
| 43 | Afterwards create a build directory in any location you like and run: |
|---|
| 44 | |
|---|
| 45 | cmake -DCMAKE_BUILD_PREFIX=/path/to/the/install/dir /path/to/example_plugin |
|---|
| 46 | make |
|---|
| 47 | make install |
|---|
| 48 | |
|---|
| 49 | If you need help, feel free to ask on the opensync mailing lists: |
|---|
| 50 | http://sourceforge.net/projects/opensync and go to "Lists" |
|---|
| 51 | |
|---|
| 52 | or ask on our irc channel: |
|---|
| 53 | server: irc.freenode.org |
|---|
| 54 | channel: #opensync |
|---|