/* NOLINKSV.C */

#include <notes.g>
#include <hwim.h>

GLREF_D PR_EDWIN *DatApp3;

GLDEF_C VOID InitLinkServer(VOID)
    {
    f_newsend(CAT_NOTES_NOTES,C_NOLINKSV,O_SV_INIT);
    }

LOCAL_C VOID DestroyLinker(PR_NOLINKSV *self)
    {
    hDestroy(self->nolinksv.ewls);
    self->nolinksv.ewls=NULL;
    }

#pragma METHOD_CALL

METHOD VOID nolinksv_ls_set_format(PR_NOLINKSV *self,INT type)
    {
    DestroyLinker(self);
    self->nolinksv.ewls=f_newsend(CAT_NOTES_HWIM,C_EWLINKSV,
                                                O_EWLS_INIT,DatApp3,type);
    }

METHOD INT nolinksv_ls_get_data(PR_NOLINKSV *self,INT len)
    {
    if (len>0)
    	{
    	if (((INT)(self->linksv.len=p_send4(self->nolinksv.ewls,
                                O_EWLS_EXTRACT,&self->linksv.buf,len)))>=0)
    	    return(TRUE);
    	}
    DestroyLinker(self);
    return(FALSE);				       
    }
