URLCrunch.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * The contents of this file are subject to the Mozilla Public
  3. * License Version 1.1 (the "License"); you may not use this file
  4. * except in compliance with the License. You may obtain a copy of
  5. * the License at http://www.mozilla.org/MPL/
  6. *
  7. * Software distributed under the License is distributed on an "AS
  8. * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  9. * implied. See the License for the specific language governing
  10. * rights and limitations under the License.
  11. *
  12. * The Original Code is Vision.
  13. *
  14. * The Initial Developer of the Original Code is The Vision Team.
  15. * Portions created by The Vision Team are
  16. * Copyright (C) 1999, 2000, 2001 The Vision Team. All Rights
  17. * Reserved.
  18. *
  19. * Contributor(s): Todd Lair
  20. *
  21. */
  22. #ifndef URLCRUNCH_H_
  23. #define URLCRUNCH_H_
  24. #include <Locker.h>
  25. #include <String.h>
  26. #include <TypeConstants.h>
  27. #ifndef B_URL_MIME_PREFIX
  28. #define B_URL_MIME_PREFIX "application/x-vnd.Be.URL."
  29. #endif
  30. class URLCrunch
  31. {
  32. BString buffer;
  33. int32 current_pos;
  34. public:
  35. URLCrunch (const char *, int32);
  36. ~URLCrunch (void);
  37. int32 Crunch (BString *);
  38. static status_t UpdateTagList(void);
  39. private:
  40. static BLocker fLocker; // protects members below
  41. static const char **fTags;
  42. };
  43. #endif