/core/externals/update-engine/Core/KSUpdateEngine+Configuration.h

http://macfuse.googlecode.com/ · C Header · 47 lines · 8 code · 8 blank · 31 comment · 0 complexity · a66f96c46c8ce0fe43940d63bfb72d19 MD5 · raw file

  1. // Copyright 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. #import <Foundation/Foundation.h>
  15. #import "KSUpdateEngine.h"
  16. // KSUpdateEngine (Configuration)
  17. //
  18. // This category defines an API for configuring KSUpdateEngine. All the
  19. // configurable options are process-wide, so they will affect all KSUpdateEngine
  20. // instances. In most cases the default values should be sufficient, so this API
  21. // will rarely need to be used.
  22. @interface KSUpdateEngine (Configuration)
  23. // Returns the prefix name for the install scripts. For example, if the prefix
  24. // is ".foo", then the install scripts will be named ".foo_preinstall",
  25. // ".foo_install", and ".foo_postinstall".
  26. + (NSString *)installScriptPrefix;
  27. // Sets the prefix name for the install scripts.
  28. + (void)setInstallScriptPrefix:(NSString *)prefix;
  29. // Returns the KSServer class that will be used when checking for updates. The
  30. // returned class is guaranteed to be a subclass of KSServer. This method never
  31. // returns nil.
  32. + (Class)serverClass;
  33. // Sets the KSServer class type to use when checking for updates. This enables
  34. // UpdateEngine to be able to communicate with different server types simply by
  35. // setting different subclasses of KSServer. The specified class MUST be a
  36. // subclass of KSServer; it will be ignored otherwise. Setting the value to nil
  37. // will return things to their default values.
  38. + (void)setServerClass:(Class)serverClass;
  39. @end