dae shm api
/* A dae client makes a request to dae-core to export or import a particular shm seg by name and dae-core takes care of the rest. This enables multiples shm segs per client app and per dae-core on a session/setup basis. */
struct daeshm { int (*shmnotifycallback)(short int notifylevel,int segid,char *_name,int _pages,int _rw,int _status); };
// client app calls: // -----------------
/* Initialise dae-shm in client app. */ void daeinitshm();
/* Request shm export of a named segment. Actual memory size is in page multiples of os system (4096 generally). rw is either "DAESHMR" or "DAESHMRW", the first being read only and the 2nd allowing writing by importing apps. */ int daeshmconnectexport(char *,int,int);
/* Request shm import of a named segment. Actual memory size is defined by app exporting the shm seg. A shm seg has to be exported first before being imported (this will change soon to allow early requests!) rw is either "DAESHMR" or "DAESHMRW", but if the exporting app has defined DAESHMR, then a DAESHMRW request will only return DAESHMR. */ int daeshmconnectimport(char *,int);
/* Request a disconnect of name shm seg. inout is one of "DAESHMIMPORT" or "DAESHMEXPORT". This allows a client to import a shm seg it is exporting, and so must be mentioned in the disconnect request. */ int daeshm_disconnect(char *,int);
/* Request a named shm seg be resized to the new size. Can also redefine RW status. This only works if the client app is exporting the named shm seg. Importing clients automatically drop the shm (so it can be destroyed properly) and reimport them with the new size. */ int daeshmresize_ex(char *,int,int);
/* Request dae-core return the current status of named shm seg. (this need testing properly!!) */ int daeshmgetcorestatus(int,char *,int);
/* msg'ing callback function that passes notification messages back to the client app after an API call has been made.
All dae-shm client apps must have a callback function. All shm seg notification
msgs arrive here. The _notify_level is one of the entries below. The
_seg_id, _name,_pages, _rw and _status are all passed back to this function. _rw
is either "DAE_SHM_R" or "DAE_SHM_RW". A _status of 0 indicates OK otherwise an
error occurred. dae_shm_perror(char *) can be called to print out the last
dae-shm error status string. Pass a string to dae_shm_perror() and it will be
printed along with the error msg.
DAE_SHM_NOTIFY_REQ_CREATE <seg_id> <name> <pages> <rw> <status>
DAE_SHM_NOTIFY_REQ_IMPORT <seg_id> <name> <pages> <rw> <status>
DAE_SHM_NOTIFY_REQ_RESIZE <seg_id> <name> <pages> <rw> <status>
DAE_SHM_NOTIFY_REQ_DROP <seg_id> <name> 0 0 <status>
DAE_SHM_NOTIFY_REQ_DESTROY <seg_id> <name> 0 0 <status>
DAE_SHM_NOTIFY_REQ_STATUS <seg_id> <name> <pages> <rw> <status>
/ /extern*/ int apprecvshmnotify(short int _notifylevel,int segid,char *_name,int _pages,int _rw,int _status);