AlarmDef.h
上传用户:lqx1163
上传日期:2014-08-13
资源大小:9183k
文件大小:10k
源码类别:

MTK

开发平台:

C/C++

  1. /*****************************************************************************
  2. *  Copyright Statement:
  3. *  --------------------
  4. *  This software is protected by Copyright and the information contained
  5. *  herein is confidential. The software may not be copied and the information
  6. *  contained herein may not be used or disclosed except with the written
  7. *  permission of MediaTek Inc. (C) 2005
  8. *
  9. *  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
  10. *  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
  11. *  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
  12. *  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
  13. *  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
  14. *  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
  15. *  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
  16. *  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
  17. *  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
  18. *  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
  19. *  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
  20. *  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
  21. *
  22. *  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
  23. *  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
  24. *  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
  25. *  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
  26. *  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
  27. *
  28. *  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
  29. *  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
  30. *  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
  31. *  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
  32. *  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
  33. *
  34. *****************************************************************************/
  35. /*******************************************************************************
  36.  * Filename:
  37.  * ---------
  38.  * AlarmDef.h
  39.  *
  40.  * Project:
  41.  * --------
  42.  * MAUI
  43.  *
  44.  * Description:
  45.  * ------------
  46.  * This file defines string, screen, and image ids for alarm application.
  47.  *
  48.  * Author:
  49.  * -------
  50.  * -------
  51.  *
  52.  *==============================================================================
  53.  *             HISTORY
  54.  * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  55.  *------------------------------------------------------------------------------
  56.  * removed!
  57.  *
  58.  * removed!
  59.  * removed!
  60.  * removed!
  61.  *
  62.  * removed!
  63.  * removed!
  64.  * removed!
  65.  *
  66.  * removed!
  67.  * removed!
  68.  * removed!
  69.  *
  70.  * removed!
  71.  * removed!
  72.  * removed!
  73.  *
  74.  * removed!
  75.  * removed!
  76.  * removed!
  77.  *
  78.  * removed!
  79.  * removed!
  80.  * removed!
  81.  *
  82.  * removed!
  83.  * removed!
  84.  * removed!
  85.  *
  86.  * removed!
  87.  * removed!
  88.  * removed!
  89.  *
  90.  * removed!
  91.  * removed!
  92.  * removed!
  93.  *
  94.  * removed!
  95.  * removed!
  96.  * removed!
  97.  *
  98.  *------------------------------------------------------------------------------
  99.  * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! 
  100.  *==============================================================================
  101.  *******************************************************************************/
  102.  /**
  103.  * Copyright Notice
  104.  * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
  105.  * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
  106.  *  (It is illegal to remove this copyright notice from this software or any
  107.  *  portion of it)
  108.  */
  109. /**************************************************************
  110.    FILENAME : AlarmDef.h
  111.    PURPOSE     : Alarm application 
  112.    REMARKS     : nil
  113.    AUTHOR      : Gautam Saluja
  114.    DATE     : June 16,03
  115. **************************************************************/
  116. #ifndef _MMI_ALARMDEF_H
  117. #define _MMI_ALARMDEF_H
  118. #include "PixtelDatatypes.h"
  119. #include "DateTimeType.h"
  120. #include "AlarmFrameworkProt.h"
  121. /* 
  122.  * Define
  123.  */
  124. #define SIZE_OF_DATE_STRING   (13*ENCODING_LENGTH)      /* Jan, 10 2004 + 1 */
  125. #define MAX_SNOOZE_CHANCES 10
  126. /* PMT Pankaj removedd the macro for count of number of menu items in the Edit Alarm screen. */
  127. #define NUM_STATE_FOR_ALM 2
  128. #ifdef __MMI_ADVANCED_TODO__
  129. #define NUM_STATE_FOR_TDL 5
  130. #else /* __MMI_ADVANCED_TODO__ */ 
  131. #define NUM_STATE_FOR_TDL 2
  132. #endif /* __MMI_ADVANCED_TODO__ */ 
  133. #ifdef __MMI_ALM_AUDIO_OPTIONS__
  134. #define NUM_AUDIO_OPTIONS 2
  135. #endif 
  136. #define NUM_DAYS 7
  137. #define HOUR_LENGTH 2
  138. #define MINUTE_LENGTH 2
  139. #define COLON_LENGTH  1
  140. #define AM_PM_LENGTH 2
  141. #define SPACE_LENGTH 1
  142. #define SIZE_OF_ALARM_STRING  ((HOUR_LENGTH + MINUTE_LENGTH + COLON_LENGTH + AM_PM_LENGTH + SPACE_LENGTH + 1) * ENCODING_LENGTH)
  143. #define ALARM_FREQ_NUM 3
  144. #define SET_STATE 1
  145. #define UNSET_STATE  0
  146. #ifdef __MMI_ALM_AUDIO_OPTIONS__
  147. #define MAX_MANUAL_INPUT_LEN 6
  148. #define MIN_FM_FREQUENCY 875
  149. #define MAX_FM_FREQUENCY 1080
  150. typedef enum ALM_AUDIO_OPTIONS
  151. {
  152.     ALM_AUDIO_OPTIONS_TONE,
  153.     ALM_AUDIO_OPTIONS_FMRADIO_CHANNEL,
  154.     ALM_AUDIO_OPTIONS_FMRADIO_MANUAL
  155. } ALM_AUDIO_OPTIONS;
  156. #endif /* __MMI_ALM_AUDIO_OPTIONS__ */ 
  157. /* +3 for AM /PM */
  158. #ifdef __MMI_ALM_SNOOZE_SETTING__
  159. #define ALM_SNOOZE_INTERVAL_SETTING_NUM 11
  160. #endif 
  161. #ifdef __MMI_ALM_ALERT_TYPE__
  162. #define ALM_ALERT_TYPE_SETTING_NUM 3
  163. #define ALM_ALERT_VIBRATION_AND_RING 0
  164. #define ALM_ALERT_RING 1
  165. #define ALM_ALERT_VIBRATION 2
  166. #endif /* __MMI_ALM_ALERT_TYPE__ */ 
  167. /* 
  168.  * Typedef 
  169.  */
  170. typedef struct
  171. {
  172.     S32 CurrHiliteState;                                /* enabled or disabled state */
  173.     S32 CurrHiliteFreq;                                 /* index of current selected frequency, used in inline selection */
  174. #ifdef __MMI_ALM_CUST_VOLUME__
  175.     S32 CurrHiliteVol;                                  /* index of current highlighted volume */
  176. #endif 
  177.     alm_nvram_struct AlmList[NUM_OF_ALM];
  178.     S8 HourBuf[(HOUR_LENGTH + 1) *ENCODING_LENGTH];     /* to take the input for hh */
  179.     S8 MinBuf[(MINUTE_LENGTH + 1) *ENCODING_LENGTH];    /* to take the input for mm */
  180.     U8 CurrHiliteAlarm;                                 /* index of current highlighted alarm */
  181.     U8 IsSaveToHistory;                                 /* shall alarm screen save to history or not */
  182.     U8 IsDOWSet;                                        /* to see if DOW component is enabled */
  183.     U8 CurrHiliteSetting;
  184. #ifdef __MMI_ALM_AUDIO_OPTIONS__
  185.     S32 CurrHiliteAudioOption;                          /* the current alarm's audio option */
  186.     U16 CurrHiliteAudioOptionValue;                     /* The value can be <Ring Tone ID> or <FM Frequency> or <Channel List ID> */
  187. #endif /* __MMI_ALM_AUDIO_OPTIONS__ */ 
  188. #ifdef __MMI_ALM_SNOOZE_SETTING__
  189.     S32 CurrHilightSnoozeInterval;
  190. #endif 
  191. #ifdef __MMI_ALM_ALERT_TYPE__
  192.     S32 CurrHilightAlertType;
  193. #endif 
  194. } alm_context_struct;
  195. #ifndef NUM_MONTHS
  196. #define NUM_MONTHS 12
  197. #define NUM_MIN_HR  60
  198. #define NUM_HRS_DAY  24
  199. typedef enum MONTH_LIST
  200. {
  201.     JAN = 1, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
  202. } MONTH_LIST;
  203. #endif /* NUM_MONTHS */ 
  204. typedef enum TIME_EQUALITY
  205. {
  206.     TIME_LESS = -1,
  207.     TIME_EQUAL,
  208.     TIME_GREATER
  209. } TIME_EQUALITY;
  210. typedef enum
  211. {
  212.     SCR_ID_ALM_LIST = ALARM_BASE + 1,
  213.     SCR_ID_ALM_SAVE_CONFIRM,
  214.     SCR_ID_ALM_INDICATION,
  215.     SCR_ID_ALM_PWRON_CONFIRM,
  216.     SCR_ID_ALM_EDITOR,
  217.     SCR_ID_ALM_SUB_INDICATION,
  218.     SCR_ID_ALM_AUDIO_OPT_FMRADIO,
  219.     SCR_ID_ALM_AUDIO_OPT_FMRADIO_CHANNEL_LIST,
  220.     SCR_ID_ALM_AUDIO_OPT_FMRDO_CHANNEL_OPT,
  221.     SCR_ID_ALM_FMRDO_PREV,
  222.     SCR_ID_ALM_FMRDO_MANUAL_INPUT,
  223.     SCR_ID_ALM_FMRDO_MANUAL_INPUT_OPT,
  224.     SCR_ID_ALM_TONE_SETUP,
  225.     SCR_ID_ALM_TONE_SETUP_EXT_MELODY,
  226.     SCR_ID_ALM_TONE_SETUP_EXT_MELODY_DRV,
  227.     SCR_ID_ALM_SETTING
  228. } SCR_ID_ALM_ENUM;
  229. typedef enum
  230. {
  231.     ORGANIZER_MENU_ALARMS_STRINGID = ALARM_BASE + 1,
  232.     ALARMS_STOP_STRINGID,
  233.     ALARMS_SNOOZE_STRINGID,
  234.     ALARM_EDIT_TITLE_STRINGID,
  235.     ALARM_STR_DONE,
  236.     ALARM_REPEAT_STRING,
  237.     ALARM_REPEAT_OFF_INDEX,
  238.     ALARM_ONCE_STRING,
  239.     ALARM_HOURLY_STRING,
  240.     ALARM_EVREYDAY_STRING,
  241.     ALARM_DAYS_STRING,
  242.     ALARM_WEEKLY_STRING,
  243.     ALARM_MONTHLY_STRING,
  244.     ALARM_SEASONLY_STRING,
  245.     ALARM_YEARLY_STRING,
  246.     ALARMS_EDIT_SOFTKEY_STRINGID,
  247.     ALARMS_POWER_ON,
  248.     ALARMS_VOLUME,
  249.     STR_ID_ALM_AUDIO_OPTIONS,
  250.     STR_ID_ALM_AUDIO_OPTIONS_TONE,
  251.     STR_ID_ALM_AUDIO_OPTIONS_FMRADIO,
  252.     STR_ID_ALM_AUDIO_OPTIONS_FMRADIO_CHANNELLIST,
  253.     STR_ID_ALM_AUDIO_OPTIONS_FMRADIO_MAN_INPUT,
  254.     STR_ID_ALM_AUDIO_OPT_FMRDO_OPT_PREV,
  255.     STR_ID_ALM_FMRDO_VALID_FM_BANDWIDTH,
  256.     STR_ID_ALM_FMRDO_HEADFONE_REMINDER,
  257.     STR_ID_ALM_FMRDO_AUD_OPT_INCOMPLETE_NOTIFY,
  258.     STR_ID_ALM_FMRDO_PLEASE_PLUG_IN_EARPHONE,
  259.     STR_ID_ALM_FMRDO_INCOMPLETE_CHANNEL_INFO,
  260.     ALARMS_SETTING_STRINGID,
  261.     ALARMS_SETTING_SNOOZE_INTERVAL,
  262.     STR_ID_ALM_DEFAULT
  263. } STR_ID_ALM_ENUM;
  264. typedef enum
  265. {
  266.     ALARMS_MAIN_TITLE_IMAGEID = ALARM_BASE + 1,
  267.     ALARMS_EDIT_SOFTKEY_IMAGEID,
  268.     ALARMS_SET_TITLE_IMAGEID,
  269.     ALARM_ANIMATION_INDICATION_IMAGEID,
  270.     ALARM_ANIMATION_INDICATION_SUBLCD_IMAGEID,
  271.     ALARMS_STOP_IMAGEID,
  272.     ALARMS_SNOOZE_IMAGEID,
  273.     ORGANIZER_MENU_ALARMS_IMAGEID,
  274.     ALARM_VOLUME_IMAGEID,
  275.     IMG_ALM_AUD_OPT,
  276.     ALARMS_SET_SNOOZE_PERIOD_IMAGEID,
  277.     ALARMS_SET_ALERT_TYPE_IMAGEID,
  278.     ALARMS_IMAGEID_ALL
  279. } IMG_ID_ALM_ENUM;
  280. /* 
  281.  * Extern Global Variable
  282.  */
  283. extern alm_context_struct g_alm_cntx;
  284. /* 
  285.  * Extern Global Function
  286.  */
  287. #endif /* _MMI_ALARMDEF_H */ // #ifndef _MMI_ALARMDEF_H