openwave_pref.h
Upload User: zhongxx05
Upload Date: 2007-06-06
Package Size: 33641k
Code Size: 4k
Category:

Symbian

Development Platform:

C/C++

  1. /* ***** BEGIN LICENSE BLOCK ***** 
  2.  * Version: RCSL 1.0/RPSL 1.0 
  3.  *  
  4.  * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
  5.  *      
  6.  * The contents of this file, and the files included with this file, are 
  7.  * subject to the current version of the RealNetworks Public Source License 
  8.  * Version 1.0 (the "RPSL") available at 
  9.  * http://www.helixcommunity.org/content/rpsl unless you have licensed 
  10.  * the file under the RealNetworks Community Source License Version 1.0 
  11.  * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
  12.  * in which case the RCSL will apply. You may also obtain the license terms 
  13.  * directly from RealNetworks.  You may not use this file except in 
  14.  * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
  15.  * applicable to this file, the RCSL.  Please see the applicable RPSL or 
  16.  * RCSL for the rights, obligations and limitations governing use of the 
  17.  * contents of the file.  
  18.  *  
  19.  * This file is part of the Helix DNA Technology. RealNetworks is the 
  20.  * developer of the Original Code and owns the copyrights in the portions 
  21.  * it created. 
  22.  *  
  23.  * This file, and the files included with this file, is distributed and made 
  24.  * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
  25.  * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
  26.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
  27.  * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
  28.  * 
  29.  * Technology Compatibility Kit Test Suite(s) Location: 
  30.  *    http://www.helixcommunity.org/content/tck 
  31.  * 
  32.  * Contributor(s): 
  33.  *  
  34.  * ***** END LICENSE BLOCK ***** */ 
  35. #ifndef _OPENWAVE_PREF
  36. #define _OPENWAVE_PREF
  37. #include "pref.h"
  38. struct IHXBuffer;
  39. class CHXSimpleList;
  40. class CHXMapStringToOb;
  41. class COpenwavePref : public CPref 
  42. {
  43.   public:
  44.     /* call open_pref() to automatically create the correct 
  45.        specific preference object. */
  46.     /* automatically reads all prefs into memory. */
  47.     static  COpenwavePref* open_pref (const char* pCompanyName,
  48.                                      const char* pProductName,
  49.                                      int nProdMajorVer,
  50.                                      int nProdMinorVer
  51.                                      );
  52.         
  53.     /* class destructor - writes prefs to disk. */  
  54.     virtual ~COpenwavePref(void);
  55.     /* read_pref reads the preference specified by Key to the Buffer. */   
  56.     virtual HX_RESULT read_pref(const char* pPrefKey, IHXBuffer*& pBuffer);
  57.     /*  write_pref writes (to memory) the preference specified by Key from the 
  58.         Buffer. */ 
  59.     virtual HX_RESULT write_pref(const char* pPrefKey, IHXBuffer* pBuffer);
  60.     /*  delete_pref deletes the preference specified by Key from the Buffer. */
  61.     virtual HX_RESULT delete_pref(const char* pPrefKey); 
  62.     /* commit_prefs saves all changes to the prefs to disk (e.g. on Openwave) */ 
  63.     virtual HX_RESULT commit_prefs();
  64.     virtual HX_RESULT init_pref(const char* pCompanyName,
  65.                                 const char* pProductName,
  66.                                 int nProdMajorVer,
  67.                                 int nProdMinorVer);
  68.     /*  remove_indexed_pref removes indexed preference specified by Key */       
  69.     HX_RESULT remove_indexed_pref(const char* pPrefKey); 
  70.     virtual HX_RESULT remove_pref(const char* pPrefKey);
  71.     HX_RESULT BeginSubPref(const char* szSubPref);
  72.     HX_RESULT EndSubPref();
  73.     HX_RESULT GetPrefKey(UINT32 nIndex,IHXBuffer*& pBuffer);
  74.   protected:
  75.         
  76.     // Constructor NOTE: use open_pref() to create an instance of this class
  77.     COpenwavePref( const char* pCompanyName,
  78.                   const char* pProductName,
  79.                   int nProdMajorVer,
  80.                   int nProdMinorVer);
  81. };
  82. #endif // _OPENWAVE_PREF