              Notes for DB handler API development

This document is for developers who wish to write their own API for DB
Handler. 

The port number used in DB hander is 8883.

Command language used between DB handler and API:

1. OpenDB(host,username,password,dbname):
    Request sent to handler must be in the following format:
       <db_request>
          <command>OpenDB</command>
          <argument>host</argument>
          <argument>username</argument>
          <argument>password</argument>
          <argument>dbname</argument>
       </db_request>

2. CloseDB():
    Request sent to handler must be in the following format:
        <db_request>
           <command>CloseDB</command>
        </db_request>

3. NewProject(projectName):
    Request sent to handler must be in the following format:
         <db_request>
            <command>NewProject</command>
            <argument>projectName</argument>
         </db_request>

4. NewJob(projectid,jobName):
     Request sent to handler must be in the following format:
      <db_request>
          <command>NewJob</command>
          <argument>projectid</argument>
          <argument>jobName</argument>
      </db_request>    

5.  SetData(jobid,name,value):
      Request sent to handler must be in the following format:
      <db_request>
          <command>SetData</command>
          <argument>jobid</argument>
          <argument>name</argument>
          <argument>value</argument>
      </db_request>    

6.  GetData(jobid,name):
     Request sent to handler must be in the following format:
      <db_request>
          <command>GetData</command>
          <argument>jobid</argument>
          <argument>name</argument>
      </db_request>    

7. ListProject():
     Request sent to handler must be in the following format:
     <db_request>
          <command>ListProject</command>
     </db_request>    
 
8. ListJob(projectid):
     Request sent to handler must be in the following format:
     <db_request>
          <command>ListJob</command>
          <argument>projectid</argument>
     </db_request>

9. ListItem(jobid):
     Request sent to handler must be in the following format:
     <db_request>
          <command>ListItem</command>
          <argument>jobid</argument>
     </db_request>   

10. ImportDingbat(jobid,name,description,type,value):
     Request sent to handler must be in the following format:
     <db_request>
          <command>ImportDingbat</command>
          <argument>jobid</argument>
          <argument>name</argument>
          <argument>description</argument>
          <argument>type</argument>
          <argument>value</argument>
     </db_request>

11. ExportDingbat(jobid,name):
     Request sent to handler must be in the following format:
     <db_request>
          <command>ExportDingbat</command>
          <argument>jobid</argument>
          <argument>name</argument>
     </db_request>    

12. DeleteDingbat(jobid,name):
    Request sent to handler must be in the following format:
     <db_request>
          <command>DeleteDingbat</command>
          <argument>jobid</argument>
          <argument>name</argument>
     </db_request> 

13. DescribeDingbat(jobid,name):      
    Request sent to handler must be in the following format:
     <db_request>
          <command>DescribeDingbat</command>
          <argument>jobid</argument>
          <argument>name</argument>
     </db_request>    
 
14. GetProject(projectname):
     Request sent to handler must be in the following format:
     <db_request>
          <command>GetProject</command>
          <argument>projectname</argument>
     </db_request>    
 
15. Version():
     Request sent to handler must be in the following format:
     <db_request>
          <command>Version</command>
     </db_request>    
 
 
Responses received from handler are in the following format:
    <db_response>
       <status>...</status>
       <result>...</result>
    </db_response>      
  
















