NS_IMETHODIMP nsSmtpServer::SetKey(const char * aKey) { NS_ASSERTION(aKey, "Bad key pointer"); mKey = aKey; return getPrefs(); }
gboolean gtr_pref_flag_get( const char * key ) { bool boolVal; tr_bencDictFindBool( getPrefs( ), key, &boolVal ); return boolVal != 0; }
const char* gtr_pref_string_get( const char * key ) { const char * str = NULL; tr_bencDictFindStr( getPrefs( ), key, &str ); return str; }
double gtr_pref_double_get( const char * key ) { double d = 0.0; tr_bencDictFindReal( getPrefs( ), key, &d ); return d; }
gboolean pref_flag_get( const char * key ) { int64_t i; tr_bencDictFindInt( getPrefs( ), key, &i ); return i != 0; }
NS_INTERFACE_MAP_END nsSmtpServer::nsSmtpServer(): mKey("") { m_logonFailed = false; getPrefs(); }
int64_t gtr_pref_int_get( const char * key ) { int64_t i = 0; tr_bencDictFindInt( getPrefs( ), key, &i ); return i; }
const char* gtr_pref_string_get (const tr_quark key) { const char * str = NULL; tr_variantDictFindStr (getPrefs (), key, &str, NULL); return str; }
gboolean gtr_pref_flag_get (const tr_quark key) { bool boolVal; tr_variantDictFindBool (getPrefs (), key, &boolVal); return boolVal != 0; }
double gtr_pref_double_get (const tr_quark key) { double d = 0.0; tr_variantDictFindReal (getPrefs (), key, &d); return d; }
int64_t gtr_pref_int_get (const tr_quark key) { int64_t i = 0; tr_variantDictFindInt (getPrefs (), key, &i); return i; }
//---File exchange---------------------------- /// help function to read preferences files short Preferences::versionInit(const char* ifile) { //static unsigned long filePos=0; short stop=1; while (stop > 0) { stop =getPrefs(ifile,"next"); } if (stop==-1) std::cout<<"no more preferences"<<endl; //run=0; return stop; }// end versionInit
bool OgreKit::init(const gkString& blend) { gkPrintf("----------- OgreKit Android Demo init -----------------"); LOG_FOOT; gkString cfgfname; // Parse command line m_blend = gkDefaultBlend; if (!blend.empty()) m_blend = blend; getPrefs().debugFps = true; getPrefs().wintitle = gkString("OgreKit Demo (Press Escape to exit)[") + m_blend + gkString("]"); getPrefs().blendermat=true; //getPrefs().shaderCachePath="/sdcard/gamekit"; getPrefs().enableshadows=false; getPrefs().viewportOrientation="portrait"; // m_prefs.disableSound=false; gkPath path = cfgfname; LOG_FOOT; // overide settings if found if (path.isFileInBundle()) getPrefs().load(path.getPath()); LOG_FOOT; m_inited = initialize(); LOG_FOOT; //gkMessageManager::getSingleton().addListener(this); return m_inited; }
bool gkAndroidApp::init(AConfiguration* config, const gkString& file) { m_blend = file; getPrefs().debugFps = true; getPrefs().wintitle = gkString("OgreKit Demo [") + file + gkString("]"); getPrefs().blendermat=true; getPrefs().enableshadows=false; getPrefs().viewportOrientation="portrait"; getPrefs().extWinhandle = Ogre::StringConverter::toString((int)m_state->window); getPrefs().androidConfig = Ogre::StringConverter::toString((int)config); return initialize() && m_engine->initializeStepLoop(); }
int main () { sudokuBoard board; bool cont = true; bool sub, command; int diffculty; getPrefs (&sub, &command, &diffculty); board.clear (); while (cont) { board.generateBoard (diffculty); if (command) { cont = playCommand (board, sub); } else { cont = playCurses (board, sub); } board.clear (); } printf ("\nGoodbye!\n"); return 0; }
void gtr_pref_int_set (const tr_quark key, int64_t value) { tr_variantDictAddInt (getPrefs (), key, value); }
bool XAP_App::getGeometry(UT_sint32 *x, UT_sint32 *y, UT_uint32 *width, UT_uint32 *height, UT_uint32 *flags) { XAP_Prefs *prefs = getPrefs(); return prefs->getGeometry(x, y, width, height, flags); }
/* Window Geometry Preferences */ bool XAP_App::setGeometry(UT_sint32 x, UT_sint32 y, UT_uint32 width, UT_uint32 height , UT_uint32 flags) { XAP_Prefs *prefs = getPrefs(); return prefs->setGeometry(x, y, width, height, flags); }
void gtr_pref_string_set( const char * key, const char * value ) { tr_bencDictAddStr( getPrefs( ), key, value ); }
void gtr_pref_int_set( const char * key, int64_t value ) { tr_bencDictAddInt( getPrefs( ), key, value ); }
void gtr_pref_flag_set( const char * key, gboolean value ) { tr_bencDictAddBool( getPrefs( ), key, value ); }
void gtr_pref_double_set (const tr_quark key, double value) { tr_variantDictAddReal (getPrefs (), key, value); }
void gtr_pref_flag_set (const tr_quark key, gboolean value) { tr_variantDictAddBool (getPrefs (), key, value); }
void gtr_pref_double_set( const char * key, double value ) { tr_bencDictAddReal( getPrefs( ), key, value ); }
void gtr_pref_string_set (const tr_quark key, const char * value) { tr_variantDictAddStr (getPrefs (), key, value); }
tr_variant* gtr_pref_get_all (void) { return getPrefs (); }
void gtr_pref_save( tr_session * session ) { tr_sessionSaveSettings( session, gl_confdir, getPrefs( ) ); }
void pref_double_set( const char * key, double value ) { tr_bencDictAddDouble( getPrefs( ), key, value ); }
tr_benc* gtr_pref_get_all( void ) { return getPrefs( ); }