API Guide Home (Online version only) |

# PalmVMLaunch.h

Go to the documentation of this file.

    00001 /******************************************************************************
    00002  * Copyright (c) 2005 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  *****************************************************************************/
    00005 /**
    00006  * @ingroup Versamail
    00007  *
    00008  */
    00009
    00010 /**
    00011  * @file    PalmVMLaunch.h
    00012  * @version 1.0
    00013  *
    00014  * @brief  Defines APIs and structures for launching VersaMail to add a new message
    00015  *     from an application
    00016  *
    00017  *
    00018  * <hr>
    00019  */
    00020
    00021
    00022 #ifndef __PALMVMLAUNCH_H__
    00023 #define __PALMVMLAUNCH_H__
    00024
    00025 #include <PalmCompatibility.h>
    00026 #include <AppLaunchCmd.h>  /**< Declares MailAddRecordParamsType */
    00027
    00028
    00029 /**
    00030  * @name Launch Codes
    00031  *
    00032  */
    00033 /*@{*/
    00034 #define MMPRO_LAUNCH_CODE           (sysAppLaunchCmdCustomBase + 2)     /**< Launch code for launching VersaMail through SysUIAppSwitch.*/
    00035 #define MMPRO_ADD_MESSAGE_WITH_ATTACHMENT   (sysAppLaunchCmdCustomBase + 16)    /**< Launch for adding a message to VersaMail with attachments, more powerful than sysAppLaunchCmdAddRecord */
    00036 /*@}*/
    00037
    00038 /**
    00039  * Typedefs and constants used in VM Launch library
    00040  **/
    00041
    00042 /**
    00043  * @name
    00044  *
    00045  */
    00046 /*@{*/
    00047 #define MM_MAX_ATTACHMENTS      10      /**< Maximum no. of attach */
    00048 /*@}*/
    00049
    00050 /**
    00051  * @brief Structure for adding attachments in MMProLaunchStruct
    00052  */
    00053 typedef struct
    00054 {
    00055     int type;           /**< Type of attachment */
    00056     char* attachName;       /**< Name of attachment */
    00057     char* attachment;           /**< Pointer to attachment data*/
    00058     unsigned long aSize;        /**< Size of attachment */
    00059 } MMProAttachStruct;
    00060
    00061 /**
    00062  * @brief Structure to add a message + attachment passed with MMPRO_LAUNCH_CODE
    00063  */
    00064 typedef struct
    00065 {
    00066     Boolean interactive;        /**< Not used */
    00067     char* to;           /**< To field */
    00068     char* cc;           /**< cc field */
    00069     char* bcc;          /**< bcc field */
    00070     char* subject;          /**< subject field */
    00071     char* body;         /**< body field */
    00072     int numAttach;          /**< Number of attachments */
    00073     MMProAttachStruct* attachments; /**<Array of attachment(s) */
    00074 }MMProLaunchStruct;
    00075
    00076 /**
    00077  * @brief Data links used in an attachment, used in MMProAttachStruct2
    00078  */
    00079 typedef struct
    00080 {
    00081     CharPtr data;       /**< Pointer to the data link */
    00082     ULong size;         /**< Size of data link */
    00083 } MMProAttachDataLinks;
    00084
    00085 /**
    00086  * @brief Structure for adding attachments in MMProLaunchStruct2
    00087  */
    00088 typedef struct
    00089 {
    00090     int type;           /**< Type of attachment */
    00091     char* attachName;       /**< Name of attachment */
    00092     char* attachment;       /**< Pointer to attachment data*/
    00093     unsigned long aSize;        /**< Size of attachment */
    00094     UInt numDataLinks;      /**< No. of datalinks */
    00095     MMProAttachDataLinks *moreData; /**< Array of data link(s) */
    00096 } MMProAttachStruct2;
    00097
    00098 /**
    00099  * @brief  Structure to add a message + attachment passed with MMPRO_LAUNCH_CODE
    00100  */
    00101 typedef struct
    00102 {
    00103     Boolean interactive;
    00104     char* to;           /**< To field */
    00105     char* cc;           /**< cc field */
    00106     char* bcc;          /**< bcc field */
    00107     char* subject;          /**< subject field */
    00108     char* body;         /**< body field */
    00109     int numAttach;          /**< Number of attachments */
    00110     MMProAttachStruct2* attachments; /**< Pointer to attachment array */
    00111 }MMProLaunchStruct2;
    00112
    00113
    00114 /**
    00115  * @brief  Structure to add attachment in MailAddRecordParamsTypePlus
    00116  */
    00117 typedef struct
    00118 {
    00119     char*   attachType;         /**< Mime Type of attachment */
    00120     char*   attachDescription;  /**< Attachment description*/
    00121     char*   attachFileName;     /**< FileName of attachment */
    00122     union
    00123     {
    00124         char*   attachData;     /**<Pointer to attachment data */
    00125         LocalID attachDBID; /**<Currently not supported */
    00126     } data;
    00127
    00128     UInt32      attachSize;     /**< Size of attachment */
    00129
    00130 }   MailAddRecordAttachment;
    00131
    00132 /**
    00133  * @brief  Structure to add a message + attachment passed with MMPRO_ADD_MESSAGE_WITH_ATTACHMENT
    00134  *     Categories & MailAddRecordParamsType are defined in AppLaunchCmd.h.
    00135  *
    00136  */
    00137 typedef struct
    00138 {
    00139     MailAddRecordParamsType     mainParams; /**< Email data */
    00140     UInt8               category;   /**< Mail Category usually Oubox / Draft */
    00141     MailAddRecordAttachment     attachments[MM_MAX_ATTACHMENTS];    /**< Pointer to array of attachments */
    00142     Int16               numAttachments; /**< No. of attachments */
    00143
    00144 } MailAddRecordParamsTypePlus;
    00145
    00146
    00147 #endif

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:55 2008 for Palm API Guide