home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / notify.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  3.7 KB  |  118 lines

  1. /*++
  2.  
  3. THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  4. ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  5. THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  6. PARTICULAR PURPOSE.
  7. Copyright (c) 1995, 1996, 1997  Microsoft Corporation
  8.  
  9. Module Name:  
  10.  
  11. notify.h
  12.  
  13. Abstract:  
  14.  
  15. Notes: 
  16.  
  17.  
  18.  
  19. --*/
  20.  
  21. #ifndef _NOTIFY_H_
  22. #define _NOTIFY_H_
  23.  
  24. /*
  25.  * Parameters to the CeRunAppAtEvent() API.
  26.  */
  27.  
  28. #define NOTIFICATION_EVENT_NONE                 0
  29. #define NOTIFICATION_EVENT_TIME_CHANGE          1
  30. #define NOTIFICATION_EVENT_SYNC_END             2
  31. #define NOTIFICATION_EVENT_ON_AC_POWER          3
  32. #define NOTIFICATION_EVENT_OFF_AC_POWER         4
  33. #define NOTIFICATION_EVENT_NET_CONNECT          5
  34. #define NOTIFICATION_EVENT_NET_DISCONNECT       6
  35. #define NOTIFICATION_EVENT_DEVICE_CHANGE        7
  36. #define NOTIFICATION_EVENT_IR_DISCOVERED        8
  37. #define NOTIFICATION_EVENT_RS232_DETECTED       9
  38. #define NOTIFICATION_EVENT_RESTORE_END         10
  39.  
  40. /*
  41.  * String passed on the command line when an app is run as the result
  42.  * of a call to CeRunAppAtTime().
  43.  */
  44.  
  45. #define APP_RUN_AT_TIME                 TEXT("AppRunAtTime")
  46.  
  47. /*
  48.  * Prefix of the command line when the user requests to run the application
  49.  * that "owns" a notification.  It is followed by a space, and the
  50.  * stringized version of the notification handle.
  51.  */
  52.  
  53. #define APP_RUN_TO_HANDLE_NOTIFICATION  TEXT("AppRunToHandleNotification")
  54.  
  55. /*
  56.  * Strings passed on the command line when an event occurs that the
  57.  * app has requested via CeRunAppAtEvent.  Note that some of these
  58.  * strings will be used as the command line *prefix*, since the rest
  59.  * of the command line will be used as a parameter.
  60.  */
  61.  
  62. #define APP_RUN_AFTER_TIME_CHANGE       TEXT("AppRunAfterTimeChange")
  63. #define APP_RUN_AFTER_SYNC              TEXT("AppRunAfterSync")
  64. #define APP_RUN_AT_AC_POWER_ON          TEXT("AppRunAtAcPowerOn")
  65. #define APP_RUN_AT_AC_POWER_OFF         TEXT("AppRunAtAcPowerOff")
  66. #define APP_RUN_AT_NET_CONNECT          TEXT("AppRunAtNetConnect")
  67. #define APP_RUN_AT_NET_DISCONNECT       TEXT("AppRunAtNetDisconnect")
  68. #define APP_RUN_AT_DEVICE_CHANGE        TEXT("AppRunDeviceChange")
  69. #define APP_RUN_AT_IR_DISCOVERY         TEXT("AppRunAtIrDiscovery")
  70. #define APP_RUN_AT_RS232_DETECT         TEXT("AppRunAtRs232Detect")
  71. #define APP_RUN_AFTER_RESTORE           TEXT("AppRunAfterRestore")
  72.  
  73. /*
  74.  * Strings passed on the end of the command line for the event,
  75.  * NOTIFICATION_EVENT_DEVICE_CHANGE.  The general form will be
  76.  * "/op devicename" for instance "/ADD COM2:"
  77.  */
  78. #define NOTIFY_DEVICE_ADD               TEXT("/ADD")
  79. #define NOTIFY_DEVICE_REMOVE            TEXT("/REMOVE")
  80.  
  81. typedef struct UserNotificationType {
  82.     DWORD ActionFlags;
  83. #define PUN_LED     1
  84. #define PUN_VIBRATE 2
  85. #define PUN_DIALOG  4
  86. #define PUN_SOUND   8
  87. #define PUN_REPEAT 16
  88.     TCHAR *pwszDialogTitle;
  89.     TCHAR *pwszDialogText;
  90.     TCHAR *pwszSound;
  91.     DWORD nMaxSound;
  92.     DWORD dwReserved;
  93. } CE_USER_NOTIFICATION, *PCE_USER_NOTIFICATION;
  94.  
  95. /* Declarations of User Notification APIs. */
  96.  
  97. #ifdef __cplusplus
  98. extern "C" {
  99. #endif //__cplusplus
  100.  
  101. HANDLE CeSetUserNotification (HANDLE hNotification, TCHAR *pwszAppName, SYSTEMTIME *lpTime, PCE_USER_NOTIFICATION lpUserNotification);
  102.  
  103. BOOL CeClearUserNotification (HANDLE hNotification);
  104.  
  105. BOOL CeRunAppAtTime (TCHAR *pwszAppName, SYSTEMTIME *lpTime);
  106.  
  107. BOOL CeRunAppAtEvent(TCHAR *pwszAppName, LONG lWhichEvent);
  108.  
  109. BOOL CeHandleAppNotifications (TCHAR *pwszAppName);
  110.  
  111. BOOL CeGetUserNotificationPreferences (HWND hWndParent, PCE_USER_NOTIFICATION lpNotification);
  112.  
  113. #ifdef __cplusplus
  114. }
  115. #endif  //__cplusplus
  116.  
  117. #endif /* _NOTIFY_H_ */
  118.