2012-04-25 22:26:35 +04:00
|
|
|
/**
|
2012-10-09 07:02:04 +04:00
|
|
|
* FreeRDP: A Remote Desktop Protocol Implementation
|
2012-04-25 22:26:35 +04:00
|
|
|
* RemoteFX USB Redirection
|
|
|
|
*
|
|
|
|
* Copyright 2012 Atrust corp.
|
|
|
|
* Copyright 2012 Alfred Liu <alfred.liu@atruscorp.com>
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __ISOCH_QUEUE_H
|
|
|
|
#define __ISOCH_QUEUE_H
|
|
|
|
|
|
|
|
#include "urbdrc_types.h"
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct _ISOCH_CALLBACK_DATA ISOCH_CALLBACK_DATA;
|
|
|
|
typedef struct _ISOCH_CALLBACK_QUEUE ISOCH_CALLBACK_QUEUE;
|
|
|
|
|
|
|
|
|
|
|
|
struct _ISOCH_CALLBACK_DATA
|
|
|
|
{
|
|
|
|
void * inode;
|
|
|
|
void * prev;
|
|
|
|
void * next;
|
|
|
|
void * device;
|
2012-10-09 11:01:37 +04:00
|
|
|
BYTE * out_data;
|
2012-10-09 11:26:39 +04:00
|
|
|
UINT32 out_size;
|
2012-04-25 22:26:35 +04:00
|
|
|
void * callback;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
struct _ISOCH_CALLBACK_QUEUE
|
|
|
|
{
|
|
|
|
int isoch_num;
|
|
|
|
ISOCH_CALLBACK_DATA* curr; /* current point */
|
|
|
|
ISOCH_CALLBACK_DATA* head; /* head point in linked list */
|
|
|
|
ISOCH_CALLBACK_DATA* tail; /* tail point in linked list */
|
|
|
|
|
|
|
|
pthread_mutex_t isoch_loading;
|
|
|
|
|
|
|
|
/* Isochronous queue service */
|
|
|
|
void (*rewind) (ISOCH_CALLBACK_QUEUE * queue);
|
2015-07-06 17:46:21 +03:00
|
|
|
BOOL (*has_next) (ISOCH_CALLBACK_QUEUE * queue);
|
2012-04-25 22:26:35 +04:00
|
|
|
int (*unregister_data) (ISOCH_CALLBACK_QUEUE* queue, ISOCH_CALLBACK_DATA* isoch);
|
|
|
|
ISOCH_CALLBACK_DATA *(*get_next) (ISOCH_CALLBACK_QUEUE * queue);
|
|
|
|
ISOCH_CALLBACK_DATA *(*register_data) (ISOCH_CALLBACK_QUEUE* queue,
|
|
|
|
void * callback, void * dev);
|
|
|
|
void (*free) (ISOCH_CALLBACK_QUEUE * queue);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2013-02-15 01:20:43 +04:00
|
|
|
ISOCH_CALLBACK_QUEUE* isoch_queue_new(void);
|
2012-04-25 22:26:35 +04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __ISOCH_QUEUE_H */
|