Tonido Platform: Developers Guide (DRAFT)
Total Page:16
File Type:pdf, Size:1020Kb
Tonido Platform: Developers Guide (DRAFT) Updated: June 29, 2009 Contents 1. Introduction ...................................................................................................................................... 4 1.1. What is Tonido? ........................................................................................................................ 7 1.2. Why Tonido? ............................................................................................................................. 8 1.3. Supported Platforms ................................................................................................................. 8 1.4. Running Tonido ......................................................................................................................... 9 1.5. What you need to know to build Tonido applications .............................................................. 9 1.6. Reference Books ....................................................................................................................... 9 2. Build System .................................................................................................................................... 11 2.1. What is included in the SDK .................................................................................................... 11 2.2. Supported Platforms ............................................................................................................... 11 2.3. Building on Windows .............................................................................................................. 11 2.4. Building on Linux ..................................................................................................................... 12 2.5. Building on Mac OSX ............................................................................................................... 12 3. Writing your first Tonido Application ............................................................................................. 13 3.1. Name your application ............................................................................................................ 13 3.2. Create a Application project ................................................................................................... 13 3.3. Write one or more services ..................................................................................................... 13 3.4. Export Services from the shared library.................................................................................. 18 3.5. Implement the required function calls ................................................................................... 18 3.6. Writing a manifest ................................................................................................................... 19 3.7. Prepare Application icon files ................................................................................................. 19 3.8. Create the application directory ............................................................................................. 20 3.9. Restart Tonido ......................................................................................................................... 20 Tonido Platform Developers Guide © CodeLathe LLC Page 1 4. Tonido Platform Overview .............................................................................................................. 21 4.1. System Components ............................................................................................................... 21 4.2. The Tonido Runtime Platform ................................................................................................. 22 4.3. Tonido Domain Server ............................................................................................................ 24 5. Services and Messages Architecture .............................................................................................. 27 5.1. Services ................................................................................................................................... 27 5.2. Messages ................................................................................................................................. 29 5.3. Variant Data ............................................................................................................................ 30 5.4. Dispatcher ............................................................................................................................... 33 5.5. Common Service Operations .................................................................................................. 33 5.6. Deferred Dispatcher ................................................................................................................ 35 6. Application Basics ........................................................................................................................... 36 6.1. Tonido Directory Layout ......................................................................................................... 36 6.2. Application Lifecycle ............................................................................................................... 39 6.3. Manifests................................................................................................................................. 41 7. HTTP Interface ................................................................................................................................. 44 7.1. Anatomy of a HTTP Request ................................................................................................... 45 7.2. Anatomy of a HTTP Response ................................................................................................. 46 7.3. HTTP Core Authentication ...................................................................................................... 47 8. P2P Interface ................................................................................................................................... 48 9. Authentication and Security ........................................................................................................... 52 9.1. Tonido Security ....................................................................................................................... 52 9.2. AuthKeys ................................................................................................................................. 52 10. Static APIs ................................................................................................................................... 56 10.1. Profile Manager APIs ........................................................................................................... 56 10.2. Email Manager APIs ............................................................................................................ 56 10.3. Activity Manager APIs ......................................................................................................... 56 10.4. Peer Manager APIs .............................................................................................................. 56 10.5. Group Manager APIs ........................................................................................................... 56 10.6. Mail Manager APIs .............................................................................................................. 56 10.7. Network Manager APIs ....................................................................................................... 56 10.8. Remote Access Manager APIs ............................................................................................. 56 Tonido Platform Developers Guide © CodeLathe LLC Page 2 10.9. Image Manipulation ............................................................................................................ 56 10.10. Virtual FS ............................................................................................................................. 56 11. Service APIs ................................................................................................................................. 57 11.1. Timer ................................................................................................................................... 57 11.2. Event Notifier Service .......................................................................................................... 57 11.3. FileTransfer ......................................................................................................................... 58 11.4. Network .............................................................................................................................. 58 11.5. MachineInfo ........................................................................................................................ 58 11.6. Sync Proxy ........................................................................................................................... 58 11.7. Stats Service ........................................................................................................................ 58 12. Guide to Building User Interfaces for Tonido Applications ......................................................... 60 13. Third party Libraries ...................................................................................................................