/** @file  IOpener.idl */

// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
// All Rights Reserved.
// Qualcomm Technologies Proprietary and Confidential.

/** @cond */
/** 0 is not a valid service ID. */
const uint32 IOpener_INVALID_ID = 0;
/** @endcond */

/**
  IOpener requests services from the system.
*/
/** @cond */
interface IOpener {
/** @endcond */

  /**
   * @addtogroup IOpener
   * @{
   */

  /** @cond */
  /* The open() method returns this error code when it cannot find a service
     matching the ID.   */
  error ERROR_NOT_FOUND;

  /* The open() method returns this error code when the required privileges
      are not present.  */
  error ERROR_PRIVILEGE;

  /* This error code can be returned when the service is not supported (stubbed out)
     or when unmet dependencies are found at runtime.  */
  error ERROR_NOT_SUPPORTED;

  /** @endcond */

  /**
    Gets a service object from the system.

    @param[in]  id   Identifies a class of service object.
    @param[out] obj  Requested service instance.

    @return
    Object_OK if successful. \n
    ERROR_NOT_FOUND if a service matching the ID cannot be found. \n
    ERROR_PRIVILEGE if required privileges are not present. \n
    ERROR_NOT_SUPPORTED when the service is not supported (stubbed out)
    or when unmet dependencies are found at runtime.
  */
  method open(in uint32 id, out interface obj);
  /** @} */ /* end_addtogroup IOpener */
};


