playpref.h
Upload User: zhongxx05
Upload Date: 2007-06-06
Package Size: 33641k
Code Size: 10k
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 _PLAYPREF
  36. #define  _PLAYPREF
  37. #include "pref.h"
  38. #include "plprefk.h"
  39. #if 0
  40. // list of player's preferences
  41. static CPrefTableEntry PlayPrefTable[] =
  42. {
  43. #ifdef _MACINTOSH
  44. { Pref_CapiBrowserName, PrefType_Text, 0, "MOSS",          ""     }, // topic names for DDE to Web browsers
  45. #else
  46. { Pref_CapiBrowserName, PrefType_Text, 0, "Browser",          ""     }, // topic names for DDE to Web browsers
  47. #endif
  48.     { Pref_LastUsedURL,     PrefType_Text, 0, "LastURL",          ""     }, // Last URL played :  str
  49.     { Pref_Volume,          PrefType_Text, 0, "Volume",           "49"   }, // Volume setting  :  float 0 - 100
  50. { Pref_DefPort,         PrefType_Text, 0, "DefPort",          "7070" }, // Default port  :  int   7070
  51.     { Pref_AlwaysOnTop,     PrefType_Text, 0, "OnTop",            "0"    },         // Make Player a top most window :  bool true or false 
  52.     { Pref_WindowPositionX, PrefType_Text, 0, "x",                "0"    }, // x pos on root window: platform dep
  53.     { Pref_WindowPositionY, PrefType_Text, 0, "y",                "0"    }, // y pos on root window: platform dep
  54.     { Pref_ShowStatusBar,   PrefType_Text, 0, "StatusBar",        "1"    }, // show status bar :  bool true or false
  55.     { Pref_ShowInfoVolume,  PrefType_Text, 0, "InfoandVolume",   "1"    }, // show info and vol: bool true or false
  56.     { Pref_SamplingRate,    PrefType_Text, 0, "SamplingRate",     "8000" }, // sampling rate : ??
  57.     { Pref_BitsPerSample,   PrefType_Text, 0, "BitsPerSample",    "16"   }, // bits per sample: int ( 8 or 16 )
  58.     { Pref_LossCorrection,  PrefType_Text, 0, "LossCorrection",   "1"    }, // do deinterleaving : bool ( T or F )
  59.     { Pref_SendStatistics,  PrefType_Text, 0, "SendStatistics",   "1"    }, // send stats to server: bool ( T or F )
  60.     { Pref_ServerTimeOut,   PrefType_Text, 0, "ServerTimeOut",    "90"   }, // ??? in secs : int ( 0 to ? )
  61. { Pref_AcceptableLoss,  PrefType_Text, 0, "AcceptableLoss",   ""     }, // ???
  62. { Pref_RampBlocks,      PrefType_Text, 0, "RampBlocks",    ""     }, // ???
  63. { Pref_SeekPage,        PrefType_Text, 0, "SeekPage",       ""     }, // ???
  64. { Pref_SeekLine,        PrefType_Text, 0, "SeekLine",       "20"   }, // ???
  65. { Pref_NetPeriod,       PrefType_Text, 0, "NetPeriod",    ""     }, // ???
  66. { Pref_FilePeriod,      PrefType_Text, 0, "FilePeriod",    ""     }, // ???
  67. { Pref_CyclesPerPeriod, PrefType_Text, 0, "CyclesPerPeriod",  ""     }, // ???
  68.     { Pref_UseProxy,        PrefType_Text, 0, "ProxySupport",     "0"    }, // ??? : bool ( T or F )
  69.     { Pref_ProxyHost,       PrefType_Text, 0, "HttpHost",         ""     }, // proxy hostname: char *
  70.     { Pref_ProxyPort,       PrefType_Text, 0, "HttpPort",         "1090" },     // proxy port: int
  71.     { Pref_NotProxyHost,    PrefType_Text, 0, "NotProxy",         ""     }, // ???
  72.     { Pref_AudioQuality,    PrefType_Text, 0, "AudioQuality",     "0"    }, // decoder quality : int ( 0 to 100 )
  73.     { Pref_ReceiveTCP,      PrefType_Text, 0, "ReceiveTCP",       "0"    }, // get audio via TCP : bool ( T or F )
  74.     { Pref_UseUDPPort,      PrefType_Text, 0, "UseUDPPort",       "0"    }, // ???
  75.     { Pref_UDPPort,         PrefType_Text, 0, "UDPPort",          "7070" },     // UDP port: int ( ?? to ?? )
  76.     { Pref_UseSplitter,     PrefType_Text, 0, "UseSplitter",      "0"    }, // use splitter: bool ( T or F )
  77. { Pref_SplitterHost,    PrefType_Text, 0, "SplitterHost",   " "    }, // splitter hostname: char *
  78. { Pref_SplitterPort,    PrefType_Text, 0, "SplitterPort",   " "    }, // splitter port: int ( ?? to ?? )
  79.   { Pref_SyncMultimedia,  PrefType_Text, 0, "SyncMultimedia",   "1"    }, // do URL events: bool ( T or F )
  80.     { Pref_License,         PrefType_Text, 0, "License",          "0"    }, // show PN license: bool ( T or F )
  81.     { Pref_MultiplePlayer,  PrefType_Text, 0, "MultiplePlayer",   "0"    }, // allow multiple players: bool ( T or F )
  82.     { Pref_Bandwidth,       PrefType_Text, 0, "Bandwidth",        "28800"},     // default bandwidth for BW
  83.     { Pref_Sites,           PrefType_Text, 0, "Sites",   ""     }, // defaults for sites menu
  84.     { Pref_Clips,           PrefType_Text, 0, "Clips",           ""     }, // iterator for clips menu
  85.     { Pref_MaxClipCount,    PrefType_Text, 0, "MaxClipCount",     "4"    }, // number of items to remember for clips menu
  86.     { Pref_ShowPresets,     PrefType_Text, 0, "ShowPresets",   "1"    }, // show presets: bool true or false
  87. { Pref_Presets,         PrefType_Text, 0, "Presets",    ""     }, // iterator for Presets
  88. { Pref_Scan,            PrefType_Text, 0, "Scan",       ""     }, // scan iterator
  89. { Pref_ScanTime,        PrefType_Text, 0, "EndScan",   "10000"},   // endtime for scan ram file items
  90. { Pref_HTTPProxyHost,   PrefType_Text, 0, "HTTPProxyHost",    ""     }, // http proxy for http get
  91. { Pref_HTTPProxyPort,   PrefType_Text, 0, "HTTPProxyPort",    "80"   }, // http proxy port
  92. { Pref_ClientLicense,   PrefType_Text, 0, "ClientLicenseKey", "0"    }, // encoded license key
  93. { Pref_URLtoHurl,       PrefType_Text, 0, "URLtoHurl",   ""     }, // The user's timecast URL: http://www.timecast.com/config.cgi?uid=fff3456...
  94. { Pref_HurledURL,       PrefType_Text, 0, "HurledURL",   "0"    }, // 0 or 1 indicates that we Hurled it...
  95. { Pref_PerfectPlayTime, PrefType_Text, 0, "PerfectPlayTime",  "60"   }, // PerfectPlay default time - 30 secs.
  96. { Pref_PerfectPlayMode, PrefType_Text, 0, "PerfectPlayMode",  "0"    }, // 0 or 1 indicates that we are in perfect play mode in player
  97.     { Pref_NetworkLatency,  PrefType_Text, 0, "NetworkLatency",   "3000" }, // default network latency is 3000 ms. used for resend buffer depth
  98.     { Pref_AutoTransport,   PrefType_Text, 0, "AutoTransport",   "1"    }, // 0 or 1 indicates that we will auto find the best transport
  99.     { Pref_AttemptMulticast,PrefType_Text, 0, "AttemptMulticast", "1"    }, // 0 or 1 indicates that in user transport mode we will attempt Multicast
  100.     { Pref_AttemptUDP,      PrefType_Text, 0, "AttemptUDP",   "1"    }, // 0 or 1 indicates that in user transport mode we will attempt UDP
  101.     { Pref_AttemptTCP,      PrefType_Text, 0, "AttemptTCP",   "1"    }, // 0 or 1 indicates that in user transport mode we will attempt TCP
  102.     { Pref_MulticastTimeout,PrefType_Text, 0, "MulticastTimeout", "2000" }, // time in ms to give up on Multicast.
  103.     { Pref_UDPTimeout,      PrefType_Text, 0, "UDPTimeout",   "2000" }, // time in ms to give up on UDP.
  104.     { Pref_ClipID,          PrefType_Text, 0, "ClipID",   "0"    }, // Clip number played - acts as a unique ID to write log files...
  105. { Pref_MusicChoice,     PrefType_Text, 0, "MusicChoice",      "0"    }, // ???
  106.     { Pref_HomeURL,         PrefType_Text, 0, "HomeURL",   "http://www.realaudio.com/"},// URL to hurl when user clicks on Home button
  107.     { Pref_CustomCaption,   PrefType_Text, 0, "CustomCaption",   NULL   }, // This caption overwrites the caption of the main Player's window
  108.     { Pref_UserName,        PrefType_Text, 0, "UserName",   "0"    }, // ???
  109.     { Pref_UserCompany,     PrefType_Text, 0, "UserCompany",   "0"    }, // ???
  110.     { Pref_UserEmail,       PrefType_Text, 0, "UserEmail",   "0"    }, // ???
  111.     { Pref_PerfPlayEntireClip, PrefType_Text, 0, "PerfPlayEntireClip",  "0"  } // 1 indicates that in perfect play mode Player will buffer entire clip
  112. };
  113. #endif // 0
  114. class CPlayerPref : public CPref
  115. {
  116. public:
  117. /*  call open_pref() to automatically create the correct platform specific Player's 
  118.     preference object. If open_pref() returns NULL, an error occurred and the 
  119.     CPlayerPref object was not created. Call last_error to get the error */
  120. #ifndef _CARBON
  121. static CPref * open_pref(const char* pCompanyName, const char* pProductName, UINT32 nProdMajorVer,  UINT32 nProdMinorVer, BOOL bCommon = TRUE);
  122. #else
  123. // for the Mac, we default to bCommon=FALSE since we want non-admin users to be able to run a new install, so by default
  124. // prefs get written per-user
  125. static CPref * open_pref(const char* pCompanyName, const char* pProductName, UINT32 nProdMajorVer,  UINT32 nProdMinorVer, BOOL bCommon = FALSE);
  126. #endif // _CARBON
  127. /*    class destructor */  
  128.    virtual              ~CPlayerPref         (void);
  129. };              
  130. #endif // _PLAYPREF