/**----------------------------------------------------------------------
** Copyright	: Video Surveillance(China) Co. Ltd 2006-20007
** File Name	: transactions.h
** Description  : Defines about Metadata transactions among mgr clients,
**				DBS and other servers. 
** Created On   : 08/20/2007
** Created by   : 
** Modification : 
** 
**---------------------------------------------------------------------*/
#ifndef __VS_TRANSACTIONS_HEADER__
#define __VS_TRANSACTIONS_HEADER__


/*---------------------------Defines----------------------------*/

/**
 * Transaction types, indicate which action is taken by Device Manager
 */

/* Add a device, insert to all tables related to the device */
#define	TRANS_TYPE_ADD_DEV			 1
/*
  Update one or more tables related to one device.
  The modification of camera's stream type and/or port (implies one DELETE and one INSERT of CameraSetting)
  is also included in this transaction type 
 */
#define	TRANS_TYPE_MODIFY_DEV		  2
/* Delete from all tables related to one device */
#define	TRANS_TYPE_DEL_DEV			 3
/* Delete all slaves and the master itself, then add them with new attributes in reverse order */
#define	TRANS_TYPE_DEL_ADD_MASTER	  4
/* Update CameraSetting of multiple cameras in one transaction */
#define	TRANS_TYPE_BATCH_MODIFY_CAMERA 5


#endif /* __VS_TRANSACTIONS_HEADER__ */

