Usage of python dbClientAPI
-------------------------------
CVS Id $Id: python_clientAPI.txt,v 1.2 2006/12/05 10:19:15 wy45 Exp $


July 28 06

Wanjuan Yang
---------------------------------------------------------------------

In class handlerconnection, the following methods for .def backend are available:

DbRegister(uesr,pid,broadcast)
CheckServerStatus()
OpenDatabase(project)
HandlerDisconnect()
ShutDown()
CloseDatabase(project)
NewRecord(project)
DeleteRecord(project,job_id)
ItemExists(project,job_id,item)
SetData(project,job_id,value)
GetData(project,job_id,item)
GetDescription(project,job_list,db_display,db_display_format)
SelectJobs(project,item,pattern)
ListProjects()
DeleteProject(project)
GetProjectDir(project)
ListDefDirs()
GetDefDir(def_dir)
GetNJOB(project)
GetNProjects()


Usages: create a handlerconnection instance, then call DbRegister().
        Call OpenDatabase() before calling any other functions which access
        the project data. Call HandlerDisconnect() at the end.

Examples:

conn = handlerconnection() 
conn.DbRegister('wy45','123',False)   ## note: now it only work when specify
broadcast to False. i.e. not request to receive broadcast message. This will
change in the future.
conn.ListProjects()
conn.OpenDatabase('TEST')
conn.NewRecord('TEST')
...

conn.CloseDatabase('TEST')
conn.HandlerDisconnect()

