messagingapp/msgutils/convergedmessageutils/tsrc/mmstestbed/inc/mmsreadfile.h
changeset 52 12db4185673b
parent 44 36f374c67aa8
child 61 8ba0afbb4637
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
     1 /*
       
     2  * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:
       
    15  */
       
    16 
       
    17 #ifndef MMSREADFILE_H
       
    18 #define MMSREADFILE_H
       
    19 
       
    20 //  INCLUDES
       
    21 #include <e32base.h>
       
    22 #include <badesca.h>
       
    23 #include <f32file.h>
       
    24 #include <msvstd.h>
       
    25 
       
    26 // forward references
       
    27 class CMmsAttaStructure;
       
    28 class CMmsHeaders;
       
    29 class CEikonEnv;
       
    30 class CMmsClientMtm;
       
    31 
       
    32 // Out-of-range value for any MMS header with assigned number
       
    33 // Used in coverage tests to get coverage for "default" branches
       
    34 // in "case" statements.
       
    35 const TInt KMmsTestIllegalValue = 255;
       
    36 
       
    37 //
       
    38 // TEST KEY WORDS
       
    39 // Extended to include all MMS headers to allow generation of arbitrary PDUs
       
    40 // Content type header cannot be separately defined,
       
    41 // it will always be "multipat/mixed" or "multipart/related"
       
    42 _LIT8( KTestEndOfFile,          "EOF" );
       
    43 _LIT8( KTestNewMessage,         "MESSAGE BEGIN" );
       
    44 //------------------------------------------------
       
    45 _LIT8( KTestMessageType,        "MESSAGE-TYPE" ); //X-Mms-Message-Type
       
    46 _LIT8( KTestDate,               "DATE" ); // Date
       
    47 _LIT8( KTestFrom,               "FROM" ); // From
       
    48 _LIT8( KTestTo,                 "TO" ); // To
       
    49 _LIT8( KTestCc,                 "CC" ); // Cc
       
    50 _LIT8( KTestBcc,                "BCC" ); // Bcc
       
    51 _LIT8( KTestSubject,            "SUBJECT" ); // Subject
       
    52 _LIT8( KTestExpiryRel,          "EXPIRY-REL" ); // X-Mms-Expiry, relative
       
    53 _LIT8( KTestExpiryAbs,          "EXPIRY-ABS" ); // X-Mms-Expiry, absolute
       
    54 _LIT8( KTestDeliveryTimeRel,    "DELIVERY-TIME-REL" ); // X-Mms-Delivery-Time, relative
       
    55 _LIT8( KTestDeliveryTimeAbs,    "DELIVERY-TIME-ABS" ); // X-Mms-Delivery-Time, absolute
       
    56 _LIT8( KTestPriority,           "PRIORITY" ); // X-Mms-Priority
       
    57 _LIT8( KTestSenderVisibility,   "SENDER-VISIBILITY" ); // X-Mms-Sender-Visibility
       
    58 _LIT8( KTestDeliveryReport,     "DELIVERY-REPORT" ); // X-Mms-Delivery-Report
       
    59 _LIT8( KTestReadReply,          "READ-REPLY" ); // X-Mms-Read-Report
       
    60 // ---------------------------------------------------
       
    61 _LIT8( KTestNewAttachment,      "ATTACHMENT" );
       
    62 _LIT8( KTestAttachmentType,     "ATTACHMENTTYPE" );
       
    63 _LIT8( KTestAttachmentName,     "ATTACHMENTNAME" );
       
    64 _LIT8( KTestAttachmentContLoc,  "ATTACHMENTCONTLOC" );
       
    65 _LIT8( KTestAttachmentCharset,  "ATTACHMENTCHARSET" );
       
    66 _LIT8( KTestAttachmentCid,      "ATTACHMENTCID" );
       
    67 _LIT8( KTestAttachmentRoot,     "ATTACHMENTROOT" );
       
    68 // content-type and x-type parameters for attachments
       
    69 // should appear in name-value pairs.
       
    70 // Test program is not responsible for verifying illegal scripts
       
    71 _LIT8( KTestAttContTypeParamName, "ContTypeParamName" );
       
    72 _LIT8( KTestAttContTypeParamValue, "ContTypeParamValue" );
       
    73 _LIT8( KTestAttXTypeParamName, "X-TypeParamName" );
       
    74 _LIT8( KTestAttXTypeParamValue, "X-TypeParamValue" );
       
    75 // -----------------------------------------------------
       
    76 _LIT8( KTestMessageClass,       "MESSAGE-CLASS" ); // X-Mms-Message-Class
       
    77 _LIT8( KTestDelivRepSendAllow,  "DELIV-REP-SEND-ALLOW" ); // X-Mms-Report-Allowed
       
    78 _LIT8( KTestAcceptAdvertis,     "ACCEPT-ADVERTISEMENTS" );
       
    79 _LIT8( KTestRetryCount,         "RETRY-COUNT" );
       
    80 _LIT8( KTestRetryInterval,      "RETRY-INTERVAL" );
       
    81 // -------------------------------------------------
       
    82 _LIT8( KTestAlias,				"ALIAS" );
       
    83 _LIT8( KTestFromAlias,			"FROMALIAS" );
       
    84 _LIT8( KTestToAlias,			"TOALIAS" );
       
    85 _LIT8( KTestCcAlias,			"CCALIAS" );
       
    86 _LIT8( KTestBccAlias,			"BCCALIAS" );
       
    87 // -------------------------------------------------
       
    88 // more Message headers to allow testing all possible PDUs and
       
    89 // MMS 1.1 headers
       
    90 _LIT8( KTestReplyCharging,      "REPLY-CHARGING" ); // X-Mms-Reply-Charging
       
    91 _LIT8( KTestReplyChargAbs,      "REPLY-CHARG-DEADLINE-ABS" ); // X-Mms-Reply-Charging, absolute
       
    92 _LIT8( KTestReplyChargRel,      "REPLY-CHARG-DEADLINE-REL" ); // X-Mms-Reply-Charging, relative
       
    93 _LIT8( KTestReplyChargSize,     "REPLY-CHARG-SIZE" ); // X-Mms-Reply-Charging-Size (octets)
       
    94 _LIT8( KTestReplyChargID,       "REPLY-CHARGING-ID" ); // X-Mms-Reply-Charging-ID
       
    95 _LIT8( KTestTID,                "TID" );
       
    96 _LIT8( KTestContentLocation,    "CONTLOC" ); // X-Mms-Content-Location
       
    97 // The following three must appear as triplets.
       
    98 // index must be first, address and date may appear in any order
       
    99 _LIT8( KTestPreviouslySentIndex, "PREVIOUSINDEX" ); // forwarded count for X-Mms-PreviouslySent headers
       
   100 _LIT8( KTestPreviouslySentBy,    "PREV-SENT-BY" ); // X-Mms-Previously-Sent-By
       
   101 _LIT8( KTestPreviouslySentDate,  "PREV-SENT-DATE" ); // X-Mms-Previously-Sent-Date
       
   102 //---
       
   103 _LIT8( KTestMessageId,           "MESSAGE-ID" ); // Message-ID
       
   104 _LIT8( KTestMessageSize,         "MESSAGE-SIZE" ); // X-Mms-Message-Size (octets)
       
   105 _LIT8( KTestVersion,             "MMS-VERSION" ); // X-MMS-Version (hex:, 10 = 1.0, 11 = 1.1 etc. )
       
   106 _LIT8( KTestReadStatus,          "READ-STATUS" ); // X-Mms-Read-Status
       
   107 _LIT8( KTestResponseStatus,      "RESPONSE-STATUS" ); // X-Mms-Response-Status
       
   108 _LIT8( KTestResponseText,        "RESPONSE-TEXT" ); // X-Mms-Response-Text
       
   109 _LIT8( KTestRetrieveStatus,      "RETRIEVE-STATUS" ); // X-Mms-Retrieve-Status
       
   110 _LIT8( KTestRetrieveText,        "RETRIEVE-TEXT" ); // X-Mms-Retrieve-Text
       
   111 _LIT8( KTestStatus,              "STATUS" ); // X-Mms-Status
       
   112 // -------------------------------------------------
       
   113 // MMS 1.2 headers
       
   114 _LIT8( KTestAttribute,          "ATTRIBUTE" ); // X-Mms-Attribute
       
   115 // The value should be one of the following:
       
   116 // BCC, CC, CONTENT, CONTENT-TYPE, DATE, DELIVERY-REPORT, DELIVERY-TIME-ABS,
       
   117 // EXPIRY-ABS, FROM, MESSAGE-CLASS, MESSAGE-ID, MESSAGE-SIZE, PRIORITY,
       
   118 // READ-REPLY, SUBJECT, TO, REPLY-CHARGING, REPLY-CHARGING-ID,
       
   119 // REPLY-CHARG-DEADLINE-ABS, REPLY-CHARG-SIZE, PREV-SENT-BY,
       
   120 // PREV-SENT-DATE, ADDITIONAL-HEADERS
       
   121 _LIT8( KTestDistributionIndicator,  "DISTRIBUTION-INDICATOR" ); // X-Mms-Distribution-Indicator
       
   122 _LIT8( KTestLimit,              "LIMIT" ); // X-Mms-Limit
       
   123 _LIT8( KTestMessageQuota,       "MESSAGE-QUOTA" ); // X-Mms-Mbox-Quota, message number
       
   124 _LIT8( KTestSizeQuota,          "SIZE-QUOTA" ); // X-Mms-Mbox-Quota, size quota
       
   125 _LIT8( KTestMessageTotal,       "MESSAGE-TOTAL" ); // X-Mms-Mbox-Totals, message number
       
   126 _LIT8( KTestSizeTotal,          "SIZE-TOTAL" ); // X-Mms-Mbox-Totals, total size
       
   127 _LIT8( KTestMessageCount,       "MESSAGE-COUNT" ); // X-Mms-Message-Count
       
   128 _LIT8( KTestAddKeyword,         "ADD-KEYWORD" ); // X-Mms-MM-Flags
       
   129 _LIT8( KTestRemoveKeyword,      "REMOVE-KEYWORD" ); // X-Mms-MM-Flags
       
   130 _LIT8( KTestFilterKeyword,      "FILTER-KEYWORD" ); // X-Mms-MM-FLags
       
   131 _LIT8( KTestMMState,            "MESSAGE-STATE" ); // X-Mms-MM-State
       
   132 _LIT8( KTestQuota,              "QUOTA" ); // X-Mms-Quotas
       
   133 _LIT8( KTestStart,              "START" ); // X-Mms-Start
       
   134 _LIT8( KTestStore,              "STORE" ); // X-Mms-Store
       
   135 _LIT8( KTestStored,             "STORED" ); // X-Mms-Stored
       
   136 _LIT8( KTestStoreStatus,        "STORE-STATUS" ); // X-Mms-Store-Status
       
   137 _LIT8( KTestStoreStatusText,    "STORE-STATUS-TEXT" ); // X-Mms-Store-Status-Text
       
   138 _LIT8( KTestTotals,             "TOTALS" ); // X-Mms-Totals
       
   139 // Delete confirmation header structure
       
   140 // This consists of index, content location, response status and response status text.
       
   141 // All three values are not always necessary for each index, but at least content-location
       
   142 // and response status should be present.
       
   143 // The index retains its value until a new index is encountered.
       
   144 _LIT8( KTestDeleteInfoIndex,    "DELETESTATUSINDEX" ); // index for next delete info fields
       
   145 // This header must precede content-location, response-status and response-text fields
       
   146 // in a delete confirmation. Index retains its value until a new index is encountered.
       
   147 
       
   148 // Element descriptor header not implemented
       
   149 
       
   150 // Application id headers
       
   151 // These will officially be supported in MMS encapsulation version 1.3
       
   152 // Java has non-standard support even earlier
       
   153 
       
   154 _LIT8( KTestApplicId,            "APPLIC-ID" ); // X-Mms-Applic-ID
       
   155 _LIT8( KTestReplyApplicId,       "REPLY-APPLIC-ID" ); // X-Mms-Reply-Applic-ID
       
   156 _LIT8( KTestApplicInfo,          "AUX-APPLIC-INFO" ); // X-Mms-Aux-Applic-Info
       
   157 
       
   158 // Since Encapsulation 1.3
       
   159 _LIT8( KTestContentClass,        "CONTENT-CLASS" ); // X-Mms-Content-Class
       
   160 _LIT8( KTestDrmContent,          "DRM-CONTENT" ); // X-Mms-DRM-Content
       
   161 _LIT8( KTestAdaptationAllowed,   "ADAPTATION-ALLOWED" ); // X-Mms-Adaptation-Allowed
       
   162 _LIT8( KTestRecommendedRetrievalMode, "REC-RETRIEVAL-MODE" ); // X-Mms-Recommended-Retrieval-Mode
       
   163 _LIT8( KTestRecRetrievalModeText, "REC-RETR-MODE-TEXT" ); // X-Mms-Recommended-Retrieval-Mode-Text
       
   164 _LIT8( KTestReplaceId,           "REPLACE-ID" ); // X-Mms-Replace-ID
       
   165 _LIT8( KTestStatusText,          "STATUS-TEXT" ); // X-Mms-Status-Text
       
   166 _LIT8( KTestCancelId,            "CANCEL-ID" ); // X-Mms-Cancel-ID
       
   167 _LIT8( KTestCancelStatus,        "CANCEL-STATUS" ); // X-Mms-Cancel-Status
       
   168 
       
   169 // DATA TYPES
       
   170 #define aSet            1
       
   171 #define aReset          0
       
   172 #define PartCount      100
       
   173 #define MaxAttaCount   10
       
   174 #define DefaultBufLen 256
       
   175 #define MaxRecipients   5
       
   176 
       
   177 // status returned by ReadRow
       
   178 enum TTestReadStatus
       
   179     {
       
   180     ETestUnknown,
       
   181     ETestNewMessage,
       
   182     ETestNewAttachment,
       
   183     ETestEof,    // End of file
       
   184     ETestMessageType,
       
   185     ETestDate,
       
   186     ETestFrom,
       
   187     ETestTo,
       
   188     ETestCc,
       
   189     ETestBcc,
       
   190 	ETestAlias,
       
   191 	ETestFromAlias,
       
   192 	ETestToAlias,
       
   193 	ETestCcAlias,
       
   194 	ETestBccAlias,
       
   195     ETestSubject,
       
   196     ETestExpiryRel,
       
   197     ETestExpiryAbs,
       
   198     ETestDeliveryTimeRel,
       
   199     ETestDeliveryTimeAbs,
       
   200     ETestPriority,
       
   201     ETestSenderVisibility,
       
   202     ETestDeliveryReport,
       
   203     ETestReadReply,
       
   204     ETestAttachmentType,
       
   205 //    ETestAttachmentName,
       
   206     ETestAttachmentCharset,
       
   207     ETestAttachmentCid,
       
   208 	ETestAttachmentRoot,
       
   209     ETestSettings,
       
   210     ETestMessageClass,
       
   211     ETestDelivReportSendAllow,
       
   212     ETestSingleMessageClass,
       
   213     ETestReplyCharging,
       
   214     ETestReplyChargAbs,
       
   215     ETestReplyChargRel,
       
   216     ETestReplyChargSize,
       
   217     ETestReplyChargID,
       
   218     ETestTID,
       
   219     ETestContentLocation,
       
   220     ETestPreviouslySentIndex,
       
   221     ETestPreviouslySentBy,
       
   222     ETestPreviouslySentDate,
       
   223     ETestMessageId,
       
   224     ETestMessageSize,
       
   225     ETestVersion,
       
   226     ETestReadStatus,
       
   227     ETestResponseStatus,
       
   228     ETestResponseText,
       
   229     ETestRetrieveStatus,
       
   230     ETestRetrieveText,
       
   231     ETestStatus,
       
   232     ETestAttribute,
       
   233     ETestDistributionIndicator,
       
   234     ETestLimit,
       
   235     ETestMessageQuota,
       
   236     ETestSizeQuota,
       
   237     ETestMessageTotal,
       
   238     ETestSizeTotal,
       
   239     ETestMessageCount,
       
   240     ETestAddKeyword,
       
   241     ETestRemoveKeyword,
       
   242     ETestFilterKeyword,
       
   243     ETestMMState,
       
   244     ETestQuota,
       
   245     ETestStart,
       
   246     ETestStore,
       
   247     ETestStored,
       
   248     ETestStoreStatus,
       
   249     ETestStoreStatusText,
       
   250     ETestTotals,
       
   251     ETestDeleteInfoIndex,
       
   252     ETestApplicId,
       
   253     ETestReplyApplicId,
       
   254     ETestApplicInfo,
       
   255     ETestContentClass,
       
   256     ETestDrmContent,
       
   257     ETestAdaptationAllowed,
       
   258     ETestRecommendedRetrievalMode,
       
   259     ETestRecRetrievalModeText,
       
   260     ETestReplaceId,
       
   261     ETestStatusText,
       
   262     ETestCancelId,
       
   263     ETestCancelStatus,
       
   264     ETestAttaRecommendedName,
       
   265     ETestAttachmentContLoc,
       
   266     ETestAttContTypeParamName,
       
   267     ETestAttContTypeParamValue,
       
   268     ETestAttXTypeParamName,
       
   269     ETestAttXTypeParamValue
       
   270 
       
   271     };
       
   272 
       
   273 // VALUE KEYWORDS
       
   274 _LIT( KPersonal,      "Personal" );
       
   275 _LIT( KAdvertisement, "Advertisement" );
       
   276 _LIT( KInformational, "Informational" );
       
   277 _LIT( KAuto,          "Auto" );
       
   278 _LIT( KLow,    "Low" );
       
   279 _LIT( KNormal, "Normal" );
       
   280 _LIT( KHigh,   "High" );
       
   281 _LIT( KHide,   "Hide" );
       
   282 _LIT( KShow,   "Show" );
       
   283 _LIT( KYes,    "Yes" );
       
   284 _LIT( KNo,     "No" );
       
   285 _LIT( KOn,     "On" );
       
   286 _LIT( KOff,     "Off" );
       
   287 _LIT( KDeferred, "Deferred" );
       
   288 _LIT( KExpired,  "Expired" );
       
   289 _LIT( KRetrieved, "Retrieved" );
       
   290 _LIT( KRejected, "Rejected" );
       
   291 _LIT( KUnrecognized, "Unrecognized" );
       
   292 _LIT( KIndeterminate, "Indeterminate" );
       
   293 _LIT( KForwarded, "Forwarded" );
       
   294 _LIT( KUnreachable, "Unreachable" );
       
   295 _LIT( KDraft, "Draft");
       
   296 _LIT( KSent, "Sent" );
       
   297 _LIT( KNew, "New" );
       
   298 // X-Mms-Message-Type
       
   299 _LIT( KSendReq, "SendReq" );
       
   300 _LIT( KSendConf, "SendConf" );
       
   301 _LIT( KNotifInd, "NotifInd" );
       
   302 _LIT( KNotifResp, "NotifResp" );
       
   303 _LIT( KRetrConf, "RetrConf" );
       
   304 _LIT( KAckInd, "AckInd" );
       
   305 _LIT( KDelInd, "DelInd" );
       
   306 _LIT( KReadReqInd, "ReadReqInd" );
       
   307 _LIT( KReadOrigInd, "ReadOrigInd" );
       
   308 _LIT( KForwardRec, "ForwardReq" );
       
   309 _LIT( KForwardConf, "ForwardConf" );
       
   310 _LIT( KMBoxStoreReq, "MBoxStoreReq" );
       
   311 _LIT( KMBoxStoreConf, "MBoxStoreConf" );
       
   312 _LIT( KMBoxViewReq, "MBoxViewReq" );
       
   313 _LIT( KMBoxViewConf, "MBoxViewConf" );
       
   314 _LIT( KMBoxUploadReq, "MBoxUploadReq" );
       
   315 _LIT( KMBoxUploadConf, "MBoxUploadConf" );
       
   316 _LIT( KMBoxDeleteReq, "MBoxDeleteReq" );
       
   317 _LIT( KMBoxDeleteConf, "MBoxDeleteConf" );
       
   318 _LIT( KMBoxDescr, "MBoxDescr" );
       
   319 _LIT( KDeleteReq, "DeleteReq" );
       
   320 _LIT( KDeleteConf, "DeleteConf" );
       
   321 _LIT( KCancelReq, "CancelReq" );
       
   322 _LIT( KCancelResp, "CancelConf" );
       
   323 // X-Mms-Read-Status
       
   324 _LIT( KRead, "Read" );
       
   325 _LIT( KDelNotRead, "DeletedNotRead" );
       
   326 // X-Mms-Reply-Charging
       
   327 _LIT( KRequested, "Requested" );
       
   328 _LIT( KReqTextOnly, "ReqTextOnly" );
       
   329 _LIT( KAccepted, "Accepted" );
       
   330 _LIT( KAccTextOnly, "AccTextOnly" );
       
   331 // X-Mms-Cancel-Status (only receival of request, not actual cancellation)
       
   332 _LIT( KCancelSuccessful, "CancelSuccess" );
       
   333 _LIT( KCancelCorrupted, "CancelCorrupted" );
       
   334 // X-Mms-Content-Class
       
   335 _LIT( KText, "Text" );
       
   336 _LIT( KImageBasic, "ImageBasic" );
       
   337 _LIT( KImageRich, "ImageRich" );
       
   338 _LIT( KVideoBasic, "VideoBasic" );
       
   339 _LIT( KVideoRich, "VideoRich" );
       
   340 _LIT( KMegaPixel, "MegaPixel" );
       
   341 _LIT( KContentBasic, "ContentBasic" );
       
   342 _LIT( KContentRich, "ContentRich" );
       
   343 // X-Mms-Recommended-Retrieval-Mode
       
   344 _LIT( KManual, "Manual" );
       
   345 
       
   346 //X-Mms-ResponseStatus
       
   347 // legacy values
       
   348 _LIT( KOk, "OK" );
       
   349 _LIT( KErrUnspecified, "Unspecified" );
       
   350 _LIT( KErrServiceDenied, "ServiceDenied" );
       
   351 _LIT( KErrMessageFormatCorrupt, "FormatCorrupt" );
       
   352 _LIT( KErrAddressUnresolved, "AddressUnresolved" );
       
   353 _LIT( KErrMessageNotFound, "MessageNotFound" );
       
   354 _LIT( KErrNetworkProblem, "NetworkProblem" );
       
   355 _LIT( KErrContentNotAccepted, "ContentNotAccepted" );
       
   356 _LIT( KErrUnsupportedMessage, "UnsupportedMessage" );
       
   357 // values since 1.1 (and 1.2)
       
   358 _LIT( KErrTransient, "TransientFailure" );
       
   359 _LIT( KErrTransientAddressUnresolved, "TransientAddressUnresolved" );
       
   360 _LIT( KErrTransientNotFound, "TransientMessageNotFound" );
       
   361 _LIT( KErrTransientNetworkproblem, "TransientNetworkProblem" );
       
   362 _LIT( KErrTransientPartialSuccess, "PartialSuccess" );
       
   363 _LIT( KErrPermanent, "PermanentFailure" );
       
   364 _LIT( KErrPermanentServiceDenied, "PermanentServiceDenied" );
       
   365 _LIT( KErrPermanentMessageFormatCorrupt, "PermanentFormatCorrupt" );
       
   366 _LIT( KErrPermanentAddressUnresolved, "PermanentAddressUnresolved" );
       
   367 _LIT( KErrPermanentNotFound, "PermanentMessageNotFound" );
       
   368 _LIT( KErrPermanentContentNotAccepted, "PermanentContentNotAccepted" );
       
   369 _LIT( KErrReplyChargingLimitNotMet, "ReplyChargingLimitNotMet" );
       
   370 _LIT( KErrReplyChargingRequestNotAccepted, "ReplyChargingRequestNotAccepted" );
       
   371 _LIT( KErrReplyChargingForwardingDenied, "ReplyChargingForwardingDenied" );
       
   372 _LIT( KErrReplyChargingNotSupported, "ReplyChargingNotSupported" );
       
   373 _LIT( KErrAddressHidingNotSupported, "AddressHidingNotSupported" );
       
   374 _LIT( KErrPermanentLackOfPrepaid, "PermanentLackOfPrepaid" );
       
   375 //X-Mms-RetrieveStatus (one extra value)
       
   376 _LIT( KErrRetrieveContentUnsupported, "PermanentContentUnsupported" );
       
   377 //X-Mms-Store-Status (one extra value)
       
   378 _LIT( KErrMMBoxFull, "MMBoxFull" );
       
   379 
       
   380 _LIT8( KTestContent,  "Content" ); // For attribute list only
       
   381 _LIT8( KTestAdditionalHeaders,  "ADDITIONAL-HEADERS" ); // For attribute list only
       
   382 _LIT8( KTestDeliveryTime,       "DELIVERY-TIME"); // for attribute list only
       
   383 _LIT8( KTestExpiry,             "EXPIRY"); // for attribute list only
       
   384 _LIT8( KTestReplyCharg,         "REPLY-CHARG-DEADLINE" ); // for attribute list only
       
   385 _LIT8( KTestContentType,        "CONTENT-TYPE" );  // for attribute list only
       
   386 
       
   387 /**
       
   388 *  CMmsReadFile
       
   389 */
       
   390 NONSHARABLE_CLASS( CMmsReadFile ):public CBase
       
   391     {
       
   392     public:  // Constructors and destructor
       
   393 
       
   394         static CMmsReadFile* NewL(RFs& aFs, RFileReadStream& aReadStream ); // Two-phased constructor.
       
   395         virtual ~CMmsReadFile(); // Destructor
       
   396 
       
   397     public: // New functions
       
   398 
       
   399         TInt CompleteTestL(TInt aMessageCounter, CMmsHeaders& aMmsHeaders);
       
   400         TTestReadStatus ReadRowL();
       
   401         void CreateMessageL( CMmsClientMtm* aMmsClient, CMmsHeaders* aMmsHeaders );
       
   402 		TInt FindAlias(TPtrC alias);
       
   403 		void SetAttaStructure( TBool aOldAttaStructure = EFalse );
       
   404 
       
   405     protected:  // Functions from base classes
       
   406 
       
   407     private:
       
   408 
       
   409         CMmsReadFile(); // C++ default constructor.
       
   410         // By default constructor is private.
       
   411         void ConstructL( RFs& aFs, RFileReadStream& aReadStream );
       
   412         void Reset();
       
   413 
       
   414     public: // data
       
   415         TInt                            iMessageType;
       
   416 
       
   417 
       
   418     private:     // Data
       
   419 
       
   420         RFs                             iFs;
       
   421         RFileReadStream*                iReader;
       
   422         TBuf<DefaultBufLen>             iValueBuffer;
       
   423         CDesCArray*     iAliasArray;    // aliases
       
   424         HBufC8*         iByteBuffer;
       
   425         TTime                           iDate;
       
   426         CArrayPtrFlat<CMmsAttaStructure>* iAttaStructures;
       
   427         TInt                            iAttaCount;
       
   428 		TInt							iAttaRoot;
       
   429 		TInt							iAliasCount;
       
   430         TInt                            iNextMessageType;
       
   431         TParse                          iParse;
       
   432         TFileName                       iFilename;
       
   433 
       
   434     protected:  // Data
       
   435     private:    // Data
       
   436 
       
   437         // CArrayFixFlat <TestMessage>* iMessages;
       
   438 
       
   439     public:     // Friend classes
       
   440     protected:  // Friend classes
       
   441     private:    // Friend classes
       
   442 
       
   443     };
       
   444 
       
   445 
       
   446 NONSHARABLE_CLASS( CMmsAttaStructure ):public CBase
       
   447     {
       
   448     public:  // Constructors and destructor
       
   449         static CMmsAttaStructure* NewL(); // Two-phased constructor.
       
   450         virtual ~CMmsAttaStructure(); // Destructor
       
   451     private:
       
   452         CMmsAttaStructure(); // C++ default constructor.
       
   453         // By default constructor is private.
       
   454         void ConstructL();
       
   455 
       
   456     public:     // Data
       
   457         HBufC8*         iAtta;
       
   458         HBufC8*         iAttaName; // content location
       
   459         HBufC8*         iAttaType;
       
   460         HBufC8*         iAttaCid;
       
   461         TInt            iAttaCharset;
       
   462         HBufC*          iAttaRecommendedName; // recommended filename
       
   463        	CDesC8ArrayFlat* iContentTypeParams;  // zero or more "parameter"
       
   464     	CDesC8ArrayFlat* iXTypeParams;        // zero or more X-Type "parameters"
       
   465 
       
   466     };
       
   467 
       
   468 
       
   469 #endif      // MMSREADFILE_H
       
   470 
       
   471 // End of File