browserutilities/feedsengine/FeedsServer/Reconizer/src/FeedsRec.cpp
branchRCL_3
changeset 94 919f36ff910f
parent 93 79859ed3eea9
equal deleted inserted replaced
93:79859ed3eea9 94:919f36ff910f
    13 *
    13 *
    14 * Description:  Recognizer for the bowser supported MIME types.
    14 * Description:  Recognizer for the bowser supported MIME types.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
       
    19 #include "FeedsRec.h"
    18 #include "FeedsRec.h"
    20 
    19 
    21 #include <ImplementationProxy.h>
    20 #include <ecom/implementationproxy.h>
    22 
       
    23 
    21 
    24 // Constants
    22 // Constants
    25 _LIT8(KMimeTypeRss,   "application/rss+xml");
    23 _LIT8(KMimeTypeRss,   "application/rss+xml");
    26 //_LIT8(KMimeTypeAtom,  "application/atom+xml");
    24 //_LIT8(KMimeTypeAtom,  "application/atom+xml");
    27 _LIT8(KMimeTypeXml1,  "application/xml");
    25 _LIT8(KMimeTypeXml1,  "application/xml");
    28 _LIT8(KMimeTypeXml2,  "text/xml");
    26 _LIT8(KMimeTypeXml2,  "text/xml");
    29 
       
    30 
    27 
    31 // -----------------------------------------------------------------------------
    28 // -----------------------------------------------------------------------------
    32 // CFeedsRec::CFeedsRec
    29 // CFeedsRec::CFeedsRec
    33 //
    30 //
    34 // Two-phased constructor.
    31 // Two-phased constructor.
    50 TUint CFeedsRec::PreferredBufSize()
    47 TUint CFeedsRec::PreferredBufSize()
    51 	{
    48 	{
    52 	return 0x100;
    49 	return 0x100;
    53 	}
    50 	}
    54 
    51 
    55 
       
    56 // -----------------------------------------------------------------------------
    52 // -----------------------------------------------------------------------------
    57 // CFeedsRec::SupportedDataTypeL
    53 // CFeedsRec::SupportedDataTypeL
    58 //
    54 //
    59 // Returns the index'ed supported mime-type.
    55 // Returns the index'ed supported mime-type.
    60 // -----------------------------------------------------------------------------
    56 // -----------------------------------------------------------------------------
    70 
    66 
    71         default:
    67         default:
    72             return TDataType();
    68             return TDataType();
    73         }
    69         }
    74 	}
    70 	}
    75 
       
    76 
    71 
    77 // -----------------------------------------------------------------------------
    72 // -----------------------------------------------------------------------------
    78 // CFeedsRec::DoRecognizeL
    73 // CFeedsRec::DoRecognizeL
    79 //
    74 //
    80 // Given the buffer it examines the buffer and sets the inherited
    75 // Given the buffer it examines the buffer and sets the inherited
    98     // TODO: in 3.1
    93     // TODO: in 3.1
    99 
    94 
   100     // Examine the buffer for Opml 1.0.
    95     // Examine the buffer for Opml 1.0.
   101     // TODO: in 3.1
    96     // TODO: in 3.1
   102     }
    97     }
   103 
       
   104 
    98 
   105 // -----------------------------------------------------------------------------
    99 // -----------------------------------------------------------------------------
   106 // CFeedsRec::DoRecognizeRss
   100 // CFeedsRec::DoRecognizeRss
   107 //
   101 //
   108 // Given the buffer it examines the buffer and returns the confidence level that
   102 // Given the buffer it examines the buffer and returns the confidence level that
   168         }
   162         }
   169 
   163 
   170     return confidence;
   164     return confidence;
   171     }
   165     }
   172 
   166 
   173 
       
   174 // Constants
   167 // Constants
   175 const TImplementationProxy ImplementationTable[] = 
   168 const TImplementationProxy ImplementationTable[] = 
   176 	{
   169 	{
   177     IMPLEMENTATION_PROXY_ENTRY(KFeedsRecImplUIDValue, CFeedsRec::CreateRecognizerL)
   170     IMPLEMENTATION_PROXY_ENTRY(KFeedsRecImplUIDValue, CFeedsRec::CreateRecognizerL)
   178 	};
   171 	};
   179 
       
   180 
   172 
   181 // -----------------------------------------------------------------------------
   173 // -----------------------------------------------------------------------------
   182 // ImplementationGroupProxy
   174 // ImplementationGroupProxy
   183 //
   175 //
   184 // Returns the proxy.
   176 // Returns the proxy.
   189     aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
   181     aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy);
   190 
   182 
   191     return ImplementationTable; 
   183     return ImplementationTable; 
   192     }
   184     }
   193 
   185 
   194 
       
   195 // -----------------------------------------------------------------------------
   186 // -----------------------------------------------------------------------------
   196 // CFeedsRec::CreateRecognizerL
   187 // CFeedsRec::CreateRecognizerL
   197 //
   188 //
   198 // Creates an recognizer instance.
   189 // Creates an recognizer instance.
   199 // -----------------------------------------------------------------------------
   190 // -----------------------------------------------------------------------------