apiedif.c

กก

int getstreamid()

    Get the stream id from the stream in API's editing buffer.

int keysearch(int streamid, int startpoint, char *key, int keylen, struct searchresult_t *searchresult)

    keysearch is searching key word (denoted by key, with the length of keylen) in the data stream with streamid. Instead of always starting from the beginning, you can specify a startpoint. The result of searching will be stored in searchresult. keysearch returns 1 for a successful search, -1 for an unsuccessful search.

char customsearch(int streamid, int startpoint, char *key, int keylen, int offset)

     Almost same as keysearch. Instead of storing the search result in searchresult, it return the character offset bytes after where the key is found.    

int deletebyte(int startpoint, int len)

    Delete bytes starting from startpoint for len bytes. Note: it will not modify the searchresult

int insertbyte(int startpoint, char *insertion, int len)

    Insert inserstion at offset startpoint. len is the length of insertion.

int sendstream(int streamid)

    Send the stream with stream id streamid

กก