/************************************************/ /* */ /* File : spy.c */ /* Description : Spy library */ /* Real code is in spy_local.c */ /* and spy_remote.c */ /* */ /* Author: Sfiligoi Igor */ /* */ /* Created : 21.07.1997 */ /* Last modified: 17.09.1997 */ /* */ /************************************************/ #include "spy.h" #include "spy_local.h" #include "spy_remote.h" int spy_close(SPY_id sid) { if (sid->spy_type == SPY_TYPE_LOCAL) return spy_close_local(sid); else return spy_close_remote(sid); } int spy_get(SPY_id sid, /* IN : SPY_id returned by spy_open_... */ char **buf, /* OUT: pointer to the data */ /* Should be disposed by the caller */ int *bufsize) /* OUT: buffer size */ { if (sid->spy_type == SPY_TYPE_LOCAL) return spy_get_local(sid,buf,bufsize); else return spy_get_remote(sid,buf,bufsize); }