OpenUDID.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // OpenUDID.h
  3. // openudid
  4. //
  5. // initiated by Yann Lechelle (cofounder @Appsfire) on 8/28/11.
  6. // Copyright 2011 OpenUDID.org
  7. //
  8. // Main branches
  9. // iOS code: https://github.com/ylechelle/OpenUDID
  10. //
  11. /*
  12. !!! IMPORTANT !!!
  13. IF YOU ARE GOING TO INTEGRATE OpenUDID INSIDE A (STATIC) LIBRARY,
  14. PLEASE MAKE SURE YOU REFACTOR THE OpenUDID CLASS WITH A PREFIX OF YOUR OWN,
  15. E.G. ACME_OpenUDID. THIS WILL AVOID CONFUSION BY DEVELOPERS WHO ARE ALSO
  16. USING OpenUDID IN THEIR OWN CODE.
  17. !!! IMPORTANT !!!
  18. */
  19. /*
  20. http://en.wikipedia.org/wiki/Zlib_License
  21. This software is provided 'as-is', without any express or implied
  22. warranty. In no event will the authors be held liable for any damages
  23. arising from the use of this software.
  24. Permission is granted to anyone to use this software for any purpose,
  25. including commercial applications, and to alter it and redistribute it
  26. freely, subject to the following restrictions:
  27. 1. The origin of this software must not be misrepresented; you must not
  28. claim that you wrote the original software. If you use this software
  29. in a product, an acknowledgment in the product documentation would be
  30. appreciated but is not required.
  31. 2. Altered source versions must be plainly marked as such, and must not be
  32. misrepresented as being the original software.
  33. 3. This notice may not be removed or altered from any source
  34. distribution.
  35. */
  36. #import <Foundation/Foundation.h>
  37. #import <UIKit/UIKit.h>
  38. //
  39. // Usage:
  40. // #include "OpenUDID.h"
  41. // NSString* openUDID = [OpenUDID value];
  42. //
  43. #define kOpenUDIDErrorNone 0
  44. #define kOpenUDIDErrorOptedOut 1
  45. #define kOpenUDIDErrorCompromised 2
  46. @interface OpenUDID : NSObject {
  47. }
  48. + (NSString*) value;
  49. + (NSString*) valueWithError:(NSError**)error;
  50. + (void) setOptOut:(BOOL)optOutValue;
  51. @end