Cms_MMSDoc.h
上传用户:tqh2500
上传日期:2014-05-09
资源大小:163k
文件大小:6k
开发平台:

Visual C++

  1. /*=====================================================================
  2.  Copyright (c) 2001-2002 MobileSoft Corporation
  3.     All Rights Reserved.
  4.     $Logfile: "Cms_MMSDoc.h"
  5.     $Revision:
  6.     $vision:       1.00
  7.     $Date:         08/10/2002
  8.     $Author:       mobilesoft app group
  9. $Declare: 
  10. This document contains information proprietary to MobileSoft  
  11.  Technology (Nanjing),  Corp.    Transmittal, receipt, or possession 
  12.  of this document does not express, license, or imply any rights to 
  13.  use, sell, design, or manufacture from this information. No reproduction, 
  14.  publication, or disclosure of this information, in whole or in part, 
  15.  shall be made without prior written authorization from an officer of 
  16.  MobileSoft Technology (NanJing), Corp.
  17. Abstract:
  18. Modified By:xuelianb  05-09-21
  19. Environment: 
  20. Revision History: 添加视频标志video_flag
  21.                   添加MMS_TYPE_3GP定义
  22. =====================================================================*/
  23. #ifndef MMSDOC_H
  24. #define MMSDOC_H
  25. //#include "Cms_MMSGlobal.h"
  26. //#include "Cms_MMSCfg.h"
  27. //#include "Cms_MMSDebug.h"
  28. #ifndef CENT_FILL_FIELD1
  29. #define CENT_FILL_FIELD1  char  unuseful1;
  30. #endif
  31. #ifndef CENT_FILL_FIELD2
  32. #define CENT_FILL_FIELD2  char  unuseful1;
  33. char  unuseful2;
  34. #endif
  35. #ifndef CENT_FILL_FIELD3
  36. #define CENT_FILL_FIELD3  char  unuseful1;
  37. char unuseful2; 
  38. char unuseful3;
  39. #endif
  40. #ifndef MMS_FILE_NAME_LEN
  41. #define MMS_FILE_NAME_LEN 128
  42. #endif
  43. #define MMS_TYPE_TEXT 0x01
  44. #define MMS_TYPE_WBMP 0x02
  45. #define MMS_TYPE_GIF 0x03
  46. #define MMS_TYPE_JPEG 0x04
  47. #define MMS_TYPE_WAV 0x05
  48. #define MMS_TYPE_AMR 0x06 /*Adpatative Multi Rate*/
  49. #define MMS_TYPE_MIDI 0x07
  50. #define MMS_TYPE_MP3 0x08
  51. #define MMS_TYPE_IMY 0x09
  52. #define MMS_TYPE_MMF 0x0A
  53. #define MMS_TYPE_BMP1 0x0B
  54. #define MMS_TYPE_MP4 0x0C
  55. #define MMS_TYPE_PNG 0x0D
  56. #define MMS_TYPE_3GP    0x0E   // xuelianb add[2005-09-21]
  57. #define MMS_TYPE_UNKNOWNAUDIO 0x71
  58. #define MMS_TYPE_UNKNOWNIMAGE 0x72   //20041118
  59. #define DEFAULT_SLIDE_TIMES 3000  //
  60. #define MMS_PLAY_WIDTH 128
  61. #define MMS_PLAY_HEIGHT 160
  62. typedef struct MMS_Content{
  63. struct MMS_Content *prev, /*上一内容*/
  64. *next; /*下一内容*/
  65. int           x, /*位置x*///可以考虑不要
  66. y, /*位置y*/////可以考虑不要
  67. width, /*显示宽度*/
  68. height; /*显示高度*/
  69. unsigned int type; /*内容类型*/
  70. unsigned int time_start, /*开始播放时间(ms)*/
  71. time_end; /*结束播放时间(ms)*/
  72. //unsigned char *data; /*text data, define for text content,image audio memory filename */
  73. unsigned int color; /*色彩, define for text content */
  74. char filename[MMS_FILE_NAME_LEN];
  75. char forwardlock; /*1:drm forwardlocked content; 0 free content */
  76. int                  contentsize;       //the size of text or image file 2003.73
  77. unsigned char size; /*大小, define for text content */
  78. //CENT_FILL_FIELD3
  79. }MMS_CONTENT,*pMMS_Content;
  80. typedef struct MMS_Slide{
  81. struct MMS_Slide *prev, /*上一帧*/
  82. *next; /*下一帧*/
  83. unsigned int times; /*播放总时间(ms)*/
  84. unsigned int color; /*背景颜色*/
  85. char audiofile[MMS_FILE_NAME_LEN];
  86. char audio_type; /*背景声音格式*/
  87. char audio_forwardlock; /* 1:drm forwardlocked content; 0 free content */
  88. char text_flag;
  89. char image_flag;
  90. char            video_flag;        // xuelianb modify[2005-09-21]
  91. //CENT_FILL_FIELD1
  92. pMMS_Content content_root, /*帧内容结构*/
  93. content_cur; /*帧当前内容*/
  94. int                   audiosize;    //the size of audio file 2003.7.3
  95. int textimage_order;  /* support the display station  */
  96. }MMS_SLIDE,*pMMS_Slide;
  97. typedef struct MMS_EDocument{
  98. int          width, /*默认屏幕宽度*/
  99. height; /*默认屏幕高度*/ 
  100. int             ftype; /*文件类型*/
  101. pMMS_Slide slide_root, /*MMS帧结构*/
  102. slide_cur; /*MMS当前帧*/
  103. int                 totalsize;      //  byte 2003.7.3
  104. // int textimage_order;
  105. }MMS_EDOCUMENT,*pMMS_EDocument;
  106. typedef enum _textimageorder
  107. {
  108. TEXT_FIRST = 1,
  109. IMAGE_FIRST
  110. }TEXTIMAGEORDER;
  111. /*
  112. void MMS_Init();
  113. void MMS_InitShow();
  114. */
  115. int MMS_New_Audio(unsigned char *data,unsigned int type,pMMS_Slide pSlide,pMMS_EDocument pDocument);  //2003.7.3
  116. void MMS_DelAudio(pMMS_Slide pSlide,pMMS_EDocument pDocument);
  117. pMMS_Content MMS_New_Content(unsigned char *data,unsigned int type,pMMS_Slide pSlide,pMMS_EDocument pDocument);
  118. void MMS_DelContent(pMMS_Slide pSlide,pMMS_EDocument pDocument);
  119. void MMS_PrevContent(pMMS_Slide pSlide,pMMS_EDocument pDocument);
  120. void MMS_NextContent(pMMS_Slide pSlide,pMMS_EDocument pDocument);
  121. pMMS_Slide MMS_New_Slide(pMMS_EDocument pDocument);
  122. void MMS_DelSlide(pMMS_EDocument pDocument);
  123. int MMS_PrevSlide(pMMS_EDocument pDocument);
  124. int MMS_NextSlide(pMMS_EDocument pDocument);
  125. void MMS_HeadSlide(pMMS_EDocument pDocument);
  126. void MMS_TailSlide(pMMS_EDocument pDocument);
  127. pMMS_Slide MMS_GetLastNullText(pMMS_EDocument theDocument);
  128. pMMS_Slide MMS_GetLastNullAudio(pMMS_EDocument theDocument);
  129. pMMS_Slide MMS_GetLastNullImage(pMMS_EDocument theDocument);
  130. unsigned short MMSGetSlideCount(pMMS_EDocument pDocument);
  131. unsigned short MMSGetAllContentCount(pMMS_EDocument pDocument);
  132. void MMSDelAllSlide(pMMS_EDocument pDocument);
  133. unsigned short MMSGetSlideIndex(pMMS_EDocument pDocument);
  134. pMMS_EDocument MMS_New(void);
  135. void MMSDelDocument(pMMS_EDocument pDocument);
  136. //unsigned int MMS_Close(pMMS_EDocument pDocument);
  137. void MMS_Cursor(int x,int y,pMMS_EDocument pDocument);
  138. void MMS_Layout(pMMS_EDocument pDocument);
  139. void MMSSetTextImageOrder(pMMS_EDocument pDocument,int order);
  140. int MMSGetTextImageOrder(pMMS_EDocument pDocument);
  141. #endif