#ifndef GCIUSER_HF
#define GCIUSER_HF TRUE
/*=========================================================================
 * Copyright (C) VMware, Inc. 1986-2011.  All Rights Reserved.
 *
 * Name - gciuser.hf
 *
 * You should include gciua.hf instead of this file.
 * This file is included by gciua.hf
 *
 * $Id: gciuser.hf,v 1.14 2008-01-09 22:51:04 stever Exp $
 *
 *========================================================================
 */
#include "gcistring.hf"

#define GCI_DECLARE_ACTION_EX(name, func, nargs, flags) { \
  GciUserActionSType tmpAction; \
  strlcpy(tmpAction.userActionName, (name), sizeof(tmpAction.userActionName)); \
  tmpAction.userActionNumArgs = (int)(nargs); \
  tmpAction.userAction = (GciUserActionFType)(func); \
  tmpAction.userActionFlags = (unsigned int)(flags); \
  GciInstallUserAction(&tmpAction); \
  }

/* GCI_DECLARE_ACTION:
 *  Use this macro to declare a user action.
 */
#define GCI_DECLARE_ACTION(name, func, nargs) \
  GCI_DECLARE_ACTION_EX(name, func, nargs, 0)

/* GciUserActionInit
 * Called when a user action library is loaded.
 */
#define GCIUSER_ACTION_INIT_DEF() void GciUserActionInit(void)
#define GCIUSER_ACTION_INIT_DEC() GCIUSER_ACTION_INIT_DEF()

/* GciUserActionShutdown
 * Called when a session user action library is unloaded.
 * It will never be called in an application user action library.
 * It should only be used to clean up resources used by the user
 * action library. It should not make GCI calls because the session
 * may not exist.
 */
#define GCIUSER_ACTION_SHUTDOWN_DEF() void GciUserActionShutdown(void)
#define GCIUSER_ACTION_SHUTDOWN_DEC() GCIUSER_ACTION_SHUTDOWN_DEF()


/* Declare GciUserActionInit */
GCIUSER_ACTION_INIT_DEC();

/* Declare GciUserActionShutdown */
GCIUSER_ACTION_SHUTDOWN_DEC();


#endif /* GCIUSER_HF */
