示例#1
0
文件: vplist.c 项目: cricketlong/lwqq
void vp_do_repeat(vp_command cmd,void* retval)
{
	if(cmd.dsph && cmd.func){
		vp_start(cmd.data);
		cmd.dsph(cmd.func,&cmd.data,retval);
	}

    vp_command* n = cmd.next;
    while(n){
        vp_start(n->data);
        n->dsph(n->func,&n->data,NULL);
        n = n->next;
    }
}
示例#2
0
文件: vplist.c 项目: cricketlong/lwqq
void vp_cancel(vp_command cmd)
{
    vp_start(cmd.data);
    vp_end(cmd.data);
    cmd.dsph = (VP_DISPATCH)NULL;
    cmd.func = (VP_CALLBACK)NULL;
    vp_command* n = cmd.next;
    cmd.next = NULL;
    vp_command* p;
    while(n){
        vp_start(n->data);
        vp_end(n->data);
        p = n;
        n = n->next;
        free(p);
    }
}
示例#3
0
文件: vplist.c 项目: lawm/pidgin-lwqq
void vp_do(vp_command cmd,void* retval)
{
    if(cmd.dsph==NULL||cmd.func==NULL) return;
    vp_start(cmd.data);
    cmd.dsph(cmd.func,&cmd.data,retval);
    vp_end(cmd.data);
    cmd.dsph = (VP_DISPATCH)NULL;
    cmd.func = (VP_CALLBACK)NULL;
    vp_command* n = cmd.next;
    cmd.next = NULL;
    vp_command* p;
    while(n){
        vp_start(n->data);
        n->dsph(n->func,&n->data,NULL);
        vp_end(n->data);
        p = n;
        n = n->next;
        free(p);
    }
}
示例#4
0
文件: async.c 项目: giter/pidgin-lwqq
static void timeout_come(LwqqAsyncTimerHandle timer,void* p)
{
    async_dispatch_data* data = (async_dispatch_data*)p;
    DISPATCH_FUNC dsph = data->dsph;
    CALLBACK_FUNC func = data->func;
    vp_start(data->data);
    dsph(func,&data->data,NULL);
    vp_end(data->data);
    lwqq_async_timer_stop(timer);

    //!!! should we stop first delete later?
    s_free(data);
}