nghttp2_queue.h 757 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (C) 2015-2018 Alibaba Group Holding Limited
  3. */
  4. #ifndef NGHTTP2_QUEUE_H
  5. #define NGHTTP2_QUEUE_H
  6. #ifdef HAVE_CONFIG_H
  7. #include "config.h"
  8. #endif /* HAVE_CONFIG_H */
  9. #include "nghttp2.h"
  10. typedef struct nghttp2_queue_cell {
  11. void *data;
  12. struct nghttp2_queue_cell *next;
  13. } nghttp2_queue_cell;
  14. typedef struct {
  15. nghttp2_queue_cell *front, *back;
  16. } nghttp2_queue;
  17. void nghttp2_queue_init(nghttp2_queue *queue);
  18. void nghttp2_queue_free(nghttp2_queue *queue);
  19. int nghttp2_queue_push(nghttp2_queue *queue, void *data);
  20. void nghttp2_queue_pop(nghttp2_queue *queue);
  21. void *nghttp2_queue_front(nghttp2_queue *queue);
  22. void *nghttp2_queue_back(nghttp2_queue *queue);
  23. int nghttp2_queue_empty(nghttp2_queue *queue);
  24. #endif /* NGHTTP2_QUEUE_H */