messagingappbase/smartmessaging/ringbc/inc/NsmRingTone.h
changeset 79 2981cb3aa489
parent 23 238255e8b033
equal deleted inserted replaced
25:84d9eb65b26f 79:2981cb3aa489
       
     1 /*
       
     2 * Copyright (c) 2002 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:  	This file contains enums for Nokia Smart Messaging
       
    15 *				Ringing Tone file format.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef __NSMRINGTONE_H
       
    22 #define __NSMRINGTONE_H
       
    23 
       
    24 enum // Song Pattern Header
       
    25 {
       
    26 	EPatternIdA = 0x00,
       
    27 	EPatternIdB = 0x01,
       
    28 	EPatternIdC = 0x02,
       
    29 	EPatternIdD = 0x03
       
    30 };
       
    31 
       
    32 enum // Instruction Id
       
    33 {
       
    34 	EPatternHeaderId = 0x00,
       
    35 	ENoteInstructionId = 0x01,
       
    36 	EScaleInstructionId = 0x02,
       
    37 	EStyleInstructionId = 0x03,
       
    38 	ETempoInstructionId = 0x04, 
       
    39 	EVolumeInstructionId = 0x05
       
    40 };
       
    41 
       
    42 enum //Note Value
       
    43 {
       
    44 	ENotePause = 0x00,
       
    45 	ENoteC = 0x01,
       
    46 	ENoteCis = 0x02,
       
    47 	ENoteD = 0x03,
       
    48 	ENoteDis = 0x04,
       
    49 	ENoteE = 0x05,
       
    50 	ENoteF = 0x06,
       
    51 	ENoteFis = 0x07,
       
    52 	ENoteG = 0x08,
       
    53 	ENoteGis = 0x09,
       
    54 	ENoteA = 0x0a,
       
    55 	ENoteAis = 0x0b,
       
    56 	ENoteB = 0x0c
       
    57 };
       
    58 
       
    59 enum // Note Duration
       
    60 {
       
    61 	EDurationFull = 0x00,
       
    62 	EDurationHalf = 0x01,
       
    63 	EDurationQuarter = 0x02,
       
    64 	EDurationEighth = 0x03,
       
    65 	EDurationSixteenth = 0x04,
       
    66 	EDurationThirtysecond = 0x05
       
    67 };
       
    68 
       
    69 enum // Duration Specifier
       
    70 {
       
    71 	EDurSpecifierNone = 0x00,
       
    72 	EDurSpecifierDotted = 0x01,
       
    73 	EDurSpecifireDoubleDotted =0x02, // not supported in composer
       
    74 	EDurSpecifierTriplet = 0x03
       
    75 };
       
    76 
       
    77 enum // Scale
       
    78 {
       
    79 	EScale1 = 0x00,
       
    80 	EScale2 = 0x01,
       
    81 	EScale3 = 0x02,
       
    82 	EScale4 = 0x03
       
    83 };
       
    84 
       
    85 enum // Style
       
    86 {
       
    87 	EStyleNatural = 0x00,
       
    88 	EStyleLegato = 0x01,
       
    89 	EStyleStaccato = 0x02,
       
    90     EStyleReserved = 0x03
       
    91 };
       
    92 
       
    93 enum // Tempo index
       
    94 {
       
    95 	ETempo25 = 0x00,
       
    96 	ETempo28 = 0x01,
       
    97 	ETempo31 = 0x02,
       
    98 	ETempo35 = 0x03,
       
    99 	ETempo40 = 0x04,
       
   100 	ETempo45 = 0x05,
       
   101 	ETempo50 = 0x06,
       
   102 	ETempo56 = 0x07,
       
   103 	ETempo63 = 0x08,
       
   104 	ETempo70 = 0x09,
       
   105 	ETempo80 = 0x0a,
       
   106 	ETempo90 = 0x0b,
       
   107 	ETempo100 = 0x0c,
       
   108 	ETempo112 = 0x0d,
       
   109 	ETempo125 = 0x0e,
       
   110 	ETempo140 = 0x0f,
       
   111 	ETempo160 = 0x10,
       
   112 	ETempo180 = 0x11,
       
   113 	ETempo200 = 0x12,
       
   114 	ETempo225 = 0x13,
       
   115 	ETempo250 = 0x14,
       
   116 	ETempo285 = 0x15,
       
   117 	ETempo320 = 0x16,
       
   118 	ETempo355 = 0x17,
       
   119 	ETempo400 = 0x18,
       
   120 	ETempo450 = 0x19,
       
   121 	ETempo500 = 0x1a,
       
   122 	ETempo565 = 0x1b,
       
   123 	ETempo635 = 0x1c,
       
   124 	ETempo715 = 0x1d,
       
   125 	ETempo800 = 0x1e,
       
   126 	ETempo900 = 0x1f 
       
   127 };
       
   128 
       
   129 enum // Volume levels
       
   130 {
       
   131 	EVolumeToneOff = 0x00,
       
   132 	EVolumeLevel1 = 0x01,
       
   133 	EVolumeLevel2 = 0x02,
       
   134 	EVolumeLevel3 = 0x03,
       
   135 	EVolumeLevel4 = 0x04,
       
   136 	EVolumeLevel5 = 0x05,
       
   137 	EVolumeLevel6 = 0x06,
       
   138 	EVolumeLevel7 = 0x07,
       
   139 	EVolumeLevel8 = 0x08,
       
   140 	EVolumeLevel9 = 0x09,
       
   141 	EVolumeLevel10 = 0x0a,
       
   142 	EVolumeLevel11 = 0x0b,
       
   143 	EVolumeLevel12 = 0x0c,
       
   144 	EVolumeLevel13 = 0x0d,
       
   145 	EVolumeLevel14 = 0x0e,
       
   146 	EVolumeLevel15 = 0x0f
       
   147 };
       
   148 
       
   149 // Ringing Tones Command
       
   150 const TInt KrtCommandLengthBits = 8;
       
   151 const TInt KrtCommandEnd = 0x00;
       
   152 const TInt KrtCommandEndBits = 8;
       
   153 const TInt KrtCommandFillerBits = 0;
       
   154 const TInt KrtCommandPartBits = 7;
       
   155 const TInt KrtCommandCancelCommand = 0x05;
       
   156 const TInt KrtCommandRTProgramming = 0x25;
       
   157 const TInt KrtCommandSound = 0x1d;
       
   158 const TInt KrtCommandUnicode = 0x22;
       
   159 
       
   160 // Ringing Tones Song Type
       
   161 const TInt KrtSongTypeBits = 3;
       
   162 const TInt KrtSongTypeBasic = 0x01;
       
   163 const TInt KrtSongTypeTemporary = 0x02;
       
   164 const TInt KrtSongTitleTextLengthBits = 4;
       
   165 const TInt KrtSongTitleTextLength = 1<<KrtSongTitleTextLengthBits;
       
   166 const TInt KrtSongTitleMaxLength = 0x0f;
       
   167 const TInt KrtDefaultCharBits = 8;
       
   168 const TInt KrtUnicodeCharBits = 16;
       
   169 const TInt KrtSongsequenceLengthBits = 8;
       
   170 
       
   171 // Ringing Tones Pattern
       
   172 const TInt KrtPatternIdLengthBit = 2;
       
   173 const TInt KrtPatternLoopValueBits = 4;
       
   174 const TInt KrtPatternSpecBits = 8;
       
   175 const TInt KrtPatternDefined = 0x00;
       
   176 const TInt KrtPatternRepeatInfinite = 0x0f;
       
   177 
       
   178 // Ringing Tones Instruction
       
   179 const TInt KrtInstructionIdLengthBit = 3;
       
   180 const TInt KrtNoteValueBits = 4;
       
   181 const TInt KrtNoteDurationBits = 3;
       
   182 const TInt KrtNoteDurSpecifierBits = 2;
       
   183 const TInt KrtNoteScaleBits = 2;
       
   184 const TInt KrtNoteStyleBits = 2;
       
   185 const TInt KrtTempoBits = 5;
       
   186 const TInt KrtVolumebits = 4;
       
   187 
       
   188 // Default values 
       
   189 const TInt KrtVolumeDefault = EVolumeLevel7;
       
   190 const TInt KrtBpmDefault = ETempo160;
       
   191 
       
   192 const TInt KRingingToneBmpTable[] =
       
   193 {
       
   194 	25, 28, 31, 35, 40, 45, 50, 56, 63, 70, 80, 90, 100, 112, 125,
       
   195 	140, 160, 180, 200, 225, 250, 258, 320, 355, 400, 450, 500, 
       
   196 	565, 635, 715, 800, 900
       
   197 };
       
   198 
       
   199 const TInt KrtFlagRTProgramming = 1;
       
   200 const TInt KrtFlagUnicode = 2;
       
   201 const TInt KrtFiller = 0;
       
   202 
       
   203 const TInt KrtMaxNotesInPattern = 80;
       
   204 
       
   205 #endif
       
   206