/core/externals/update-engine/externals/gdata-objectivec-client/Source/Clients/Books/GDataQueryBooks.m

http://macfuse.googlecode.com/ · Objective C · 58 lines · 28 code · 13 blank · 17 comment · 1 complexity · db07fbbcdf658e1e64d7be71d578353c MD5 · raw file

  1. /* Copyright (c) 2008 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. // GDataQueryBooks.m
  17. //
  18. #if !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_BOOKS_SERVICE
  19. #define GDATAQUERYBOOKS_DEFINE_GLOBALS 1
  20. #import "GDataQueryBooks.h"
  21. static NSString *const kMinViewabilityParamName = @"min-viewability";
  22. static NSString *const kEBookParamName = @"ebook";
  23. @implementation GDataQueryBooks
  24. + (GDataQueryBooks *)booksQueryWithFeedURL:(NSURL *)feedURL {
  25. return [self queryWithFeedURL:feedURL];
  26. }
  27. #pragma mark -
  28. - (void)setMinimumViewability:(NSString *)str {
  29. [self addCustomParameterWithName:kMinViewabilityParamName
  30. value:str];
  31. }
  32. - (NSString *)minimumViewability {
  33. NSString *str = [self valueForParameterWithName:kMinViewabilityParamName];
  34. return str;
  35. }
  36. - (void)setEBook:(NSString *)str {
  37. [self addCustomParameterWithName:kEBookParamName
  38. value:str];
  39. }
  40. - (NSString *)EBook {
  41. NSString *str = [self valueForParameterWithName:kEBookParamName];
  42. return str;
  43. }
  44. @end
  45. #endif // !GDATA_REQUIRE_SERVICE_INCLUDES || GDATA_INCLUDE_BOOKS_SERVICE