updated documentation

This commit is contained in:
Peter 'Pita' Martischka 2011-07-30 17:15:45 +01:00
parent f1d06c55b4
commit 0772f6bb4e
16 changed files with 188 additions and 20 deletions

View File

@ -1,10 +1,17 @@
# AuthorManager
`require("./AuthorManager");`
# db/AuthorMana
`require("./db/AuthorManager");`
The AuthorManager controlls all information about the Pad authors
## Functions
- - -
### getAuthor (author, callback)
Internal function that creates the database entry for an author
* **author** *(String)* The id of the author
* **callback** *(Function)* callback(err, authorObj)
- - -
### getAuthor4Token (token, callback)
Returns the Author Id for a token. If the token is unkown,

View File

@ -1,5 +1,5 @@
# db
`require("./db");`
`require("./db/DB");`
The DB Module provides a database initalized with the settings
provided by the settings module

View File

@ -1,5 +1,5 @@
# Mod
`require("./Models/Pad");`
# db/
`require("./db/Pad");`
The pad object, defined with joose

View File

@ -1,5 +1,5 @@
# PadManager
`require("./PadManager");`
# db/PadMana
`require("./db/PadManager");`
The Pad Manager is a Factory for pad Objects

View File

@ -0,0 +1,21 @@
# db/ReadOnlyMana
`require("./db/ReadOnlyManager");`
The ReadOnlyManager manages the database and rendering releated to read only pads
## Functions
- - -
### getPadId (readOnlyId, callback)
returns a the padId for a read only id
* **readOnlyId** *(String)* read only id
* **callback** *No description*
- - -
### getReadOnlyId (padId, callback)
returns a read only id for a pad
* **padId** *(String)* the id of the pad
* **callback** *No description*

View File

@ -0,0 +1,16 @@
# handler/Expor
`require("./handler/ExportHandler");`
Handles the export requests
## Functions
- - -
### doExport (req, res, padId, type)
do a requested export
* **req** *No description*
* **res** *No description*
* **padId** *No description*
* **type** *No description*

View File

@ -0,0 +1,15 @@
# handler/Impor
`require("./handler/ImportHandler");`
Handles the import requests
## Functions
- - -
### doImport (req, res, padId)
do a requested import
* **req** *No description*
* **res** *No description*
* **padId** *No description*

View File

@ -0,0 +1,38 @@
# handler/PadMessag
`require("./handler/PadMessageHandler");`
The MessageHandler handles all Messages that comes from Socket.IO and controls the sessions
## Functions
- - -
### handleConnect (client)
Handles the connection of a new user
* **client** the new client
- - -
### handleDisconnect (client)
Handles the disconnection of a user
* **client** the client that leaves
- - -
### handleMessage (client, message)
Handles a message from a user
* **client** the client that send this message
* **message** the message from the client
- - -
### setSocketIO (socket_io)
A associative array that translates a session to a pad
* **socket_io** The Socket
- - -
### updatePadClients (pad, callback)
* **pad** *No description*
* **callback** *No description*

View File

@ -0,0 +1,23 @@
# handler/Socket
`require("./handler/SocketIORouter");`
This is the Socket.IO Router. It routes the Messages between the
components of the Server. The components are at the moment: pad and timeslider
## Functions
- - -
### addComponent (moduleName, module)
Saves all components
key is the component name
value is the component module
* **moduleName** *No description*
* **module** *No description*
- - -
### setSocketIO (_socket)
sets the socket.io and adds event functions for routing
* **_socket** *No description*

View File

@ -1,5 +1,5 @@
# MessageHandler
`require("./MessageHandler");`
# handler/TimesliderMessag
`require("./handler/TimesliderMessageHandler");`
The MessageHandler handles all Messages that comes from Socket.IO and controls the sessions
@ -26,7 +26,7 @@ Handles a message from a user
- - -
### setSocketIO (socket_io)
A associative array that translates a session to a pad
Saves the Socket class we need to send and recieve data from the client
* **socket_io** The Socket

View File

@ -0,0 +1,15 @@
# utils/A
`require("./utils/Abiword");`
Controls the communication with the Abiword application
## Functions
- - -
### convertFile (srcFile, destFile, type, callback)
* **srcFile** *No description*
* **destFile** *No description*
* **type** *No description*
* **callback** *No description*

View File

@ -1,5 +1,5 @@
# AttributePoolFactory
`require("./AttributePoolFactory");`
# utils/AttributePoolF
`require("./utils/AttributePoolFactory");`
This code represents the Attribute Pool Object of the original Etherpad.
90% of the code is still like in the original Etherpad

View File

@ -1,5 +1,5 @@
# Changeset
`require("./Changeset");`
# utils/Cha
`require("./utils/Changeset");`
## Functions

View File

@ -0,0 +1,24 @@
# utils/Expo
`require("./utils/ExportHtml");`
Copyright 2009 Google Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS-IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## Functions
- - -
### getPadHTMLDocument (padId, revNum, noDocType, callback)
* **padId** *No description*
* **revNum** *No description*
* **noDocType** *No description*
* **callback** *No description*

View File

@ -1,5 +1,5 @@
# minify
`require("./minify");`
# utils/
`require("./utils/Minify");`
This Module manages all /minified/* requests. It controls the
minification && compression of Javascript and CSS.
@ -7,9 +7,10 @@ minification && compression of Javascript and CSS.
## Functions
- - -
### padJS (req, res)
Answers a http request for the pad javascript
### minifyJS (req, res, jsFilename)
creates the minifed javascript for the given minified name
* **req** the Express request
* **res** the Express response
* **jsFilename** *No description*

View File

@ -1,11 +1,15 @@
# settings
`require("./settings");`
# utils/Se
`require("./utils/Settings");`
The Settings Modul reads the settings out of settings.json and provides
this information to the other modules
##Variables
- - -
### abiword
The path of the abiword executable
- - -
### dbSettings
This setting is passed with dbType to ueberDB to set up the database
@ -18,6 +22,10 @@ This setting is passed with dbType to ueberDB to set up the database
### defaultPadText
The default Text of a new pad
- - -
### ip
The IP ep-lite should listen to
- - -
### logHTTP
A flag that shows if http requests should be loged to stdout