Solaris Common Desktop Environment: Programmer's Guide

To Request Notification of Reload Events

If you use DtDbLoad() in a long-lived application, it must dynamically reload the database whenever it is modified.

  1. Use the DtDbReloadNotify()function to request notification of reload events.

    /* Notice changes to the database without needing to restart
    	 application */
    
      	DtDbReloadNotify(DbReloadCallbackProc, callback_proc,
    	 	XTPointer, client_data);

    Supply a callback that:

    • Destroys cached database information held by the application

    • Calls the DtDbLoad() function again

Callback_proc cleans up any cached database information your application is holding and then invokes DtDbLoad(). Client_data may be used to pass additional client information to the callback routine.