TDE core libraries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ksslx509map.h 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. /* This file is part of the KDE project
  2. *
  3. * Copyright (C) 2000-2003 George Staikos <staikos@kde.org>
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public License
  16. * along with this library; see the file COPYING.LIB. If not, write to
  17. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18. * Boston, MA 02110-1301, USA.
  19. */
  20. #ifndef _KSSLX509MAP_H
  21. #define _KSSLX509MAP_H
  22. #include <tqmap.h>
  23. #include <tqstring.h>
  24. #include <tdelibs_export.h>
  25. /**
  26. * X.509 Map Parsing Class
  27. *
  28. * This class is used to parse and store a map as used in X.509 certificates.
  29. * It is of the form /name=value/name=value/name=value
  30. *
  31. * @author George Staikos <staikos@kde.org>
  32. * @see KSSL, KSSLCertificate
  33. * @short X.509 Map Parser
  34. */
  35. class TDEIO_EXPORT KSSLX509Map {
  36. public:
  37. /**
  38. * Construct an X.509 Map
  39. *
  40. * @param name the map to parse
  41. */
  42. KSSLX509Map(const TQString& name);
  43. /**
  44. * Destroy this map
  45. */
  46. ~KSSLX509Map();
  47. /**
  48. * Set a value in the map
  49. *
  50. * @param key the key
  51. * @param value the value
  52. */
  53. void setValue(const TQString& key, const TQString& value);
  54. /**
  55. * Get the value of an entry in the map
  56. *
  57. * @param key the key
  58. *
  59. * @return the value
  60. */
  61. TQString getValue(const TQString& key) const;
  62. /**
  63. * Reset (clear) the internal storage.
  64. *
  65. * @param name if this is not empty, it will be parsed and used as
  66. * the new map internally
  67. */
  68. void reset(const TQString& name = "");
  69. private:
  70. class KSSLX509MapPrivate;
  71. KSSLX509MapPrivate *d;
  72. TQMap<TQString, TQString> m_pairs;
  73. void parse(const TQString& name);
  74. };
  75. #endif