predictivesearch/PcsServer/src/CPcsServer.cpp
branchRCL_3
changeset 85 38bb213f60ba
parent 68 9da50d567e3c
equal deleted inserted replaced
74:6b5524b4f673 85:38bb213f60ba
    42     CleanupStack::PushL(self);
    42     CleanupStack::PushL(self);
    43     self->ConstructL();
    43     self->ConstructL();
    44     self->StartL(KPcsServerName);
    44     self->StartL(KPcsServerName);
    45     CleanupStack::Pop(); 
    45     CleanupStack::Pop(); 
    46     
    46     
    47      PRINT ( _L("End CPcsServer::NewL") );
    47     PRINT ( _L("End CPcsServer::NewL") );
    48     
    48     
    49     return self;
    49     return self;
    50 }
    50 }
    51 
    51 
    52 // ----------------------------------------------------------------------------
    52 // ----------------------------------------------------------------------------
    68 	PRINT ( _L("Enter CPcsServer::ConstructL") );
    68 	PRINT ( _L("Enter CPcsServer::ConstructL") );
    69 	
    69 	
    70 	iPcs = CPcsPluginInterface::NewL();
    70 	iPcs = CPcsPluginInterface::NewL();
    71     
    71     
    72 	// Check if the phone is chinese feature id installed
    72 	// Check if the phone is chinese feature id installed
    73 	TBool isChineseVariant = IsChineseFeatureInitilizedL();
    73 	iIsChineseVariant = IsChineseFeatureInitilizedL();
    74     // Create the plugin for the required algorithm
    74     // Create the plugin for the required algorithm
    75     // Matches the ECOM Plugin's display name definition in rss file
    75     // Matches the ECOM Plugin's display name definition in rss file
    76     // Check for the chinese feature id flag.
    76     // Check for the chinese feature id flag.
    77 	if(isChineseVariant) 
    77 	if(iIsChineseVariant) 
    78 	    {
    78 	    {
    79 	    // Chinese variant phones. Use Algorithm 2
    79 	    // Chinese variant phones. Use Algorithm 2
    80 	    PRINT ( _L("Enter CPcsServer::ConstructL() - Chinese Variant Phone Algorithm Instantiated") );
    80 	    PRINT ( _L("Enter CPcsServer::ConstructL() - Chinese Variant Phone Algorithm Instantiated") );
    81 	    TBuf<KAlgorithmNameMaxLen> algorithmName(KPcsAlgorithm_Chinese);
    81 	    TBuf<KAlgorithmNameMaxLen> algorithmName(KPcsAlgorithm_Chinese);
    82 	    iPcs->InstantiateAlgorithmL(algorithmName);
    82 	    iPcs->InstantiateAlgorithmL(algorithmName);
    83 	      
    83 	    
       
    84 	    
    84 	    }
    85 	    }
    85 	else 
    86 	else 
    86 	    {
    87 	    {
    87 	    // NON-Chinese variant phones. Use Algorithm 1
    88 	    // NON-Chinese variant phones. Use Algorithm 1
    88 	    PRINT ( _L("Enter CPcsServer::ConstructL() - NON-Chinese Variant Phone Algorithm Instantiated") );
    89 	    PRINT ( _L("Enter CPcsServer::ConstructL() - NON-Chinese Variant Phone Algorithm Instantiated") );
   131 // Get the plugin interface
   132 // Get the plugin interface
   132 // ----------------------------------------------------------------------------
   133 // ----------------------------------------------------------------------------
   133 CPcsPluginInterface* CPcsServer::PluginInterface()
   134 CPcsPluginInterface* CPcsServer::PluginInterface()
   134 {
   135 {
   135 	return iPcs;
   136 	return iPcs;
   136 }
   137 };
   137 
   138 
   138 // ----------------------------------------------------------------------------
   139 // ----------------------------------------------------------------------------
   139 // CPcsServer::IsChineseFeatureInitilizedL()
   140 // CPcsServer::IsChineseFeatureInitilizedL()
   140 // Returns ETrue if Chinese variant feature is initilized
   141 // Returns ETrue if Chinese variant feature is initilized
   141 // ----------------------------------------------------------------------------
   142 // ----------------------------------------------------------------------------
   148       
   149       
   149     FeatureManager::UnInitializeLib();
   150     FeatureManager::UnInitializeLib();
   150     
   151     
   151     return chineseFeatureInitialized;
   152     return chineseFeatureInitialized;
   152 }
   153 }
       
   154 
       
   155 // ----------------------------------------------------------------------------
       
   156 // CPcsServer::IsChineseVariant() const
       
   157 // Returns ETrue if there is Chinese variant feature in phone
       
   158 // ---------------------------------------------------------------------------- 
       
   159 TBool CPcsServer::IsChineseVariant() const
       
   160     {
       
   161     return iIsChineseVariant;
       
   162     }