Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * This file is part of libdom.
  3.  * Licensed under the MIT License,
  4.  *                http://www.opensource.org/licenses/mit-license.php
  5.  * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
  6.  */
  7.  
  8. #include <dom/core/typeinfo.h>
  9. #include <dom/core/string.h>
  10.  
  11. #include "utils/utils.h"
  12.  
  13. /* TypeInfo object */
  14. struct dom_type_info {
  15.         struct lwc_string_s *type;      /**< Type name */
  16.         struct lwc_string_s *namespace; /**< Type namespace */
  17. };
  18.  
  19. /**
  20.  * Get the type name of this dom_type_info
  21.  *
  22.  * \param ti   The dom_type_info
  23.  * \param ret  The name
  24.  * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
  25.  *
  26.  * We don't support this API now, so this function call always
  27.  * return DOM_NOT_SUPPORTED_ERR.
  28.  */
  29. dom_exception _dom_type_info_get_type_name(dom_type_info *ti,
  30.                 dom_string **ret)
  31. {
  32.         UNUSED(ti);
  33.         UNUSED(ret);
  34.  
  35.         return DOM_NOT_SUPPORTED_ERR;
  36. }
  37.  
  38. /**
  39.  * Get the namespace of this type info
  40.  *
  41.  * \param ti   The dom_type_info
  42.  * \param ret  The namespace
  43.  * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
  44.  *
  45.  * We don't support this API now, so this function call always
  46.  * return DOM_NOT_SUPPORTED_ERR.
  47.  */
  48. dom_exception _dom_type_info_get_type_namespace(dom_type_info *ti,
  49.                 dom_string **ret)
  50. {
  51.         UNUSED(ti);
  52.         UNUSED(ret);
  53.         return DOM_NOT_SUPPORTED_ERR;
  54. }
  55.  
  56. /**
  57.  * Whether this type info is derived from another one
  58.  *
  59.  * \param ti         The dom_type_info
  60.  * \param namespace  The namespace of name
  61.  * \param name       The name of the base typeinfo
  62.  * \param method     The deriving method
  63.  * \param ret        The return value
  64.  * \return DOM_NO_ERR on success, appropriate dom_exception on failure.
  65.  *
  66.  * We don't support this API now, so this function call always
  67.  * return DOM_NOT_SUPPORTED_ERR.
  68.  */
  69. dom_exception _dom_type_info_is_derived(dom_type_info *ti,
  70.                 dom_string *namespace, dom_string *name,
  71.                 dom_type_info_derivation_method method, bool *ret)
  72. {
  73.         UNUSED(ti);
  74.         UNUSED(namespace);
  75.         UNUSED(name);
  76.         UNUSED(method);
  77.         UNUSED(ret);
  78.         return DOM_NOT_SUPPORTED_ERR;
  79. }
  80.  
  81.