manager.h 870 Bytes
Newer Older
Benoit Steiner's avatar
Benoit Steiner committed
1
/* VideoLAN VLANbridge: Manager module
Benoit Steiner's avatar
Benoit Steiner committed
2 3 4
 *
 * Definition file
 *
Benoit Steiner's avatar
Benoit Steiner committed
5
 * You need to include <pthread.h> before including this file
Benoit Steiner's avatar
Benoit Steiner committed
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
*/



#ifndef _MANAGER_H
#define _MANAGER_H

#define EXIT_MANAGER		0
#define START_PERFORMER		1
#define CLEAN_PERFORMER		2
#define ADMIN_REQUEST		3


struct s_Manager
{
  /* Thread id */
  pthread_t tId;
23

Benoit Steiner's avatar
Benoit Steiner committed
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
  /* Predicate, mutex used to test it, and condition variable */
  pthread_mutex_t WorkLock;
  pthread_cond_t WorkSignal;

  /* Internal database */
  struct s_Base* psbBase;

  /* Fifo used to communicate with listener and performer threads */
  struct s_Fifo* psfWaitingJobs;
};


int InitManager (struct s_Manager* psmManager);
int CancelManager(struct s_Manager* psmManager);
int FreeManager(struct s_Manager* psmManager);
int WarnManager(struct s_Manager* psmManager, struct s_Request* psrJob,
                int iJobType);


#endif