Opera 12.15 Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

updatablesetting.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /* -*- Mode: c++; tab-width: 4; c-basic-offset: 4 -*-
  2. *
  3. * Copyright (C) 1995-2008 Opera Software AS. All rights reserved.
  4. *
  5. * This file is part of the Opera web browser.
  6. * It may not be distributed under any circumstances.
  7. */
  8. /** \file
  9. * This file declares the UpdatableResource base class representing resources
  10. * that can be kept updated. The two subclasses UpdatableFile and
  11. * UpdatableSetting are also defined here.
  12. *
  13. * @author Marius Blomli mariusab@opera.com
  14. */
  15. #ifndef _UPDATEABLESETTING_H_INCLUDED_
  16. #define _UPDATEABLESETTING_H_INCLUDED_
  17. #ifdef AUTO_UPDATE_SUPPORT
  18. #include "adjunct/autoupdate/updatableresource.h"
  19. /**
  20. * This class is a representation of a preference setting that is to be
  21. * kept up to date by the auto update system.
  22. * @see UpdatableResource::GetHashKey
  23. */
  24. class UpdatableSetting: public UpdatableResource
  25. {
  26. public:
  27. UpdatableSetting();
  28. /**
  29. * Implementing UpdatableResource API.
  30. */
  31. virtual UpdatableResourceType GetType() { return RTSetting; }
  32. virtual ResourceClass GetResourceClass() { return Setting; }
  33. virtual OpFileLength GetSize() const { return 0; }
  34. virtual OP_STATUS UpdateResource();
  35. virtual BOOL CheckResource() { return TRUE; }
  36. virtual OP_STATUS Cleanup() { return OpStatus::OK; }
  37. virtual const uni_char* GetResourceName() { return UNI_L("Setting"); }
  38. virtual BOOL UpdateRequiresUnpacking() { return FALSE; }
  39. virtual BOOL UpdateRequiresRestart() { return FALSE; }
  40. virtual BOOL VerifyAttributes();
  41. BOOL IsUpdateCheckInterval();
  42. };
  43. #endif // AUTO_UPDATE_SUPPORT
  44. #endif // _UPDATEABLESETTING_H_INCLUDED_