/core/externals/update-engine/externals/gdata-objectivec-client/Source/Elements/GDataStructuredPostalAddress.h

http://macfuse.googlecode.com/ · C++ Header · 118 lines · 59 code · 29 blank · 30 comment · 2 complexity · a63d36e180b8939fb9267816b24f3c30 MD5 · raw file

  1. /* Copyright (c) 2009 Google Inc.
  2. *
  3. * Licensed under the Apache License, Version 2.0 (the "License");
  4. * you may not use this file except in compliance with the License.
  5. * You may obtain a copy of the License at
  6. *
  7. * http://www.apache.org/licenses/LICENSE-2.0
  8. *
  9. * Unless required by applicable law or agreed to in writing, software
  10. * distributed under the License is distributed on an "AS IS" BASIS,
  11. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. * See the License for the specific language governing permissions and
  13. * limitations under the License.
  14. */
  15. //
  16. // GDataStructuredPostalAddress.h
  17. //
  18. #if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_CONTACTS_SERVICE \
  19. || GDATA_INCLUDE_MAPS_SERVICE
  20. #import "GDataObject.h"
  21. #undef _EXTERN
  22. #undef _INITIALIZE_AS
  23. #ifdef GDATASTRUCTUREDPOSTALADDRESS_DEFINE_GLOBALS
  24. #define _EXTERN
  25. #define _INITIALIZE_AS(x) =x
  26. #else
  27. #define _EXTERN GDATA_EXTERN
  28. #define _INITIALIZE_AS(x)
  29. #endif
  30. // rel values
  31. _EXTERN NSString* kGDataPostalAddressHome _INITIALIZE_AS(@"http://schemas.google.com/g/2005#home");
  32. _EXTERN NSString* kGDataPostalAddressWork _INITIALIZE_AS(@"http://schemas.google.com/g/2005#work");
  33. _EXTERN NSString* kGDataPostalAddressOther _INITIALIZE_AS(@"http://schemas.google.com/g/2005#other");
  34. // mail class values
  35. _EXTERN NSString* kGDataPostalAddressLetters _INITIALIZE_AS(@"http://schemas.google.com/g/2005#letters");
  36. _EXTERN NSString* kGDataPostalAddressParcels _INITIALIZE_AS(@"http://schemas.google.com/g/2005#parcels");
  37. _EXTERN NSString* kGDataPostalAddressNeither _INITIALIZE_AS(@"http://schemas.google.com/g/2005#neither");
  38. _EXTERN NSString* kGDataPostalAddressBoth _INITIALIZE_AS(@"http://schemas.google.com/g/2005#both");
  39. // usage values
  40. _EXTERN NSString* kGDataPostalAddressGeneral _INITIALIZE_AS(@"http://schemas.google.com/g/2005#general");
  41. _EXTERN NSString* kGDataPostalAddressLocal _INITIALIZE_AS(@"http://schemas.google.com/g/2005#local");
  42. @interface GDataStructuredPostalAddress : GDataObject <GDataExtension>
  43. + (id)structuredPostalAddress;
  44. // receiver of mail, or in care of ("c/o")
  45. - (NSString *)agent;
  46. - (void)setAgent:(NSString *)str;
  47. - (NSString *)city;
  48. - (void)setCity:(NSString *)str;
  49. // country name and code are in the same element, but we'll expose them
  50. // here as if they're independent to keep the interface simpler & KVC-compliant
  51. - (NSString *)countryName;
  52. - (void)setCountryName:(NSString *)str;
  53. // 3166-1 alpha-2 country codes
  54. // http://www.iso.org/iso/english_country_names_and_code_elements
  55. - (NSString *)countryCode;
  56. - (void)setCountryCode:(NSString *)str;
  57. // building name
  58. - (NSString *)houseName;
  59. - (void)setHouseName:(NSString *)str;
  60. - (NSString *)neighborhood;
  61. - (void)setNeighborhood:(NSString *)str;
  62. - (NSString *)POBox;
  63. - (void)setPOBox:(NSString *)str;
  64. - (NSString *)postCode;
  65. - (void)setPostCode:(NSString *)str;
  66. // region is a state, province, county (in Ireland), Land (in Germany),
  67. // departement (in France), or similar
  68. - (NSString *)region;
  69. - (void)setRegion:(NSString *)str;
  70. - (NSString *)street;
  71. - (void)setStreet:(NSString *)str;
  72. // subregion is not intended for delivery addresses
  73. - (NSString *)subregion;
  74. - (void)setSubregion:(NSString *)str;
  75. - (NSString *)formattedAddress;
  76. - (void)setFormattedAddress:(NSString *)str;
  77. // attributes
  78. - (NSString *)label;
  79. - (void)setLabel:(NSString *)str;
  80. - (NSString *)mailClass;
  81. - (void)setMailClass:(NSString *)str;
  82. - (BOOL)isPrimary;
  83. - (void)setIsPrimary:(BOOL)flag;
  84. - (NSString *)rel;
  85. - (void)setRel:(NSString *)str;
  86. - (NSString *)usage;
  87. - (void)setUsage:(NSString *)str;
  88. @end
  89. #endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_*_SERVICE