/** @file  IOpener.idl */

// Copyright (c) 2015, 2017 Qualcomm Technologies, Inc.  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;

  /* The open() method returns this error code when the service is not
     supported and has been stubbed out */
  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.
  */
  method open(in uint32 id, out interface obj);
  /** @} */ /* end_addtogroup IOpener */
};


