1 #ifndef LIBRARIES_MAGICBEACON_H 2 #define LIBRARIES_MAGICBEACON_H 3 4 /*************************************************************************/ 5 6 #ifndef UTILITY_UTILITY_H 7 # include <utility/tagitem.h> 8 #endif 9 10 /*************************************************************************/ 11 12 #define MAGICBEACON_NAME "magicbeacon.library" /* library name */ 13 14 /* TAG flags 15 ** 16 ** R - MagicBeacon_ApplicationRegister() call 17 ** G - MagicBeacon_GetAttr#?() call 18 ** S - MagicBeacon_SendBeacon() call 19 */ 20 21 22 #define MAGICBEACON_APPLICATIONSIGNALNUMBER (TAG_USER + 0x00000001 ) /* RG - LONG - register/get the signal in numeric form. 23 When -1 is specified as signal as signal 24 will be allocated. */ 25 #define MAGICBEACON_APPLICATIONSIGNALMASK (TAG_USER + 0x00000002 ) /* RG - IPTR - register/get the signal in signal mask 26 form */ 27 28 /* NOTE: 29 ** 30 ** If none of the signal tags above is used to define a signal for operation during 31 ** application registration process, MAGICBEACON_WAITFORRESULT, FALSE is used for 32 ** all beacons. Therefor the application will never receive any result. 33 */ 34 35 #define MAGICBEACON_APPLICATIONNAME (TAG_USER + 0x00000003 ) /* RG - STRPTR - Application name ([0-9,a-z,A-Z]) */ 36 37 #define MAGICBEACON_NOTIFICATIONNAME (TAG_USER + 0x00000101 ) /* SG - STRPTR - MBN_#? like defined below */ 38 #define MAGICBEACON_MESSAGE (TAG_USER + 0x00000102 ) /* SG - STRPTR - Message in system codeset */ 39 #define MAGICBEACON_MESSAGE_UTF8 (TAG_USER + 0x00000103 ) /* SG - STRPTR - Message in utf8 codeset */ 40 #define MAGICBEACON_USERDATA (TAG_USER + 0x00000104 ) /* SG - APTR - Place your application information here */ 41 #define MAGICBEACON_WAITFORRESULT (TAG_USER + 0x00000105 ) /* S- - BOOL - Default: TRUE */ 42 #define MAGICBEACON_RESULT (TAG_USER + 0x00000106 ) /* -G - IPTR - NOTIFICATIONRESULT_#? as defined below */ 43 44 45 #define NOTIFICATIONRESULT_IGNORED 0 /* user ignored notification */ 46 #define NOTIFICATIONRESULT_CONFIRMED 1 /* user confirmed notification */ 47 #define NOTIFICATIONRESULT_CANCELLED 2 /* user rejected notification */ 48 #define NOTIFICATIONRESULT_NOTDISPLAYED 3 /* message was not displayed (e.g. program quit while 49 ** notification still being cached or there was not 50 ** enough memory to process the message properly ) 51 */ 52 53 /* These are the error values returned by various functions 54 */ 55 56 #define MAGICBEACON_ERROR_NOERROR 0 /* Operation was successful */ 57 #define MAGICBEACON_ERROR_HANDLEMISSING 1 /* The provided handle was NULL */ 58 #define MAGICBEACON_ERROR_OUTOFMEMORY 2 /* There wasn´t enough memory available to process the beacon */ 59 #define MAGICBEACON_ERROR_NAMEMISSING 3 /* MAGICBEACON_NOTIFICATIONNAME is required */ 60 #define MAGICBEACON_ERROR_NAMEINVALID 4 /* MAGICBEACON_NOTIFICATIONNAME or MAGICBEACON_APPLICATIONNAME contain invalid characters */ 61 #define MAGICBEACON_ERROR_NAMEHASWRONGSIZE 5 /* MAGICBEACON_NOTIFICATIONNAME or MAGICBEACON_APPLICATIONNAME has the wrong size ( 3-31 ) */ 62 #define MAGICBEACON_ERROR_MAGICBEACONNOTRUNNING 6 /* Notification couldn´t be send because MagicBeacon application is not running */ 63 64 /*************************************************************************/ 65 66 #define MAGICBEACON_APPLICATIONNAME_MAXLENGTH 31 /* MAGICBEACON_APPLICATIONNAME size limit */ 67 #define MAGICBEACON_NOTIFICATIONNAME_MAXLENGTH 31 /* MAGICBEACON_NOTIFICATIONNAME size limit */ 68 69 /*************************************************************************/ 70 71 /* Standardized notification names 72 ** 73 ** The list will grow along with the ideas. If you use these, then it is 74 ** required to deliver the information mentioned inside the comment, so 75 ** all applications send informations alike. That is the %m part the user 76 ** can place inside his messages. 77 ** 78 ** If you need to encode this textual part, use the UTF-8 notification 79 ** tag. Once set the mbnm_NotificationMessage and only this field will 80 ** be treated as UTF-8. 81 ** 82 ** In case you need to send a more specific information or something 83 ** completely different, then just define your own notification name, 84 ** but please keep in mind that other applications with the same purpose 85 ** may have a similar need, so choose your name properly. 86 */ 87 88 #define MBN_ERROR "Error" /* %m - Error message */ 89 #define MBN_NEWMAIL "NewMail" /* %m - EMail summery (multiple mails) or sender and topic information\n */ 90 #define MBN_NEWRSS "NewRSS" /* %m - Topic of the feed */ 91 #define MBN_TRACKNEXT "TrackNext" /* %m - Title of track */ 92 #define MBN_TRACKLAST "TrackLast" /* %m - Application specific message */ 93 #define MBN_NEWPRIVATEMSG "NewPrivateMSG" /* %m - Chat line */ 94 #define MBN_NEWMSG "NewMSG" /* %m - Chat line */ 95 #define MBN_CONNECTED "Connected" /* %m - Server name */ 96 #define MBN_DISCONNECTED "Disconnected" /* %m - Server name */ 97 #define MBN_CONNECTIONFAILED "ConnectionFailed" /* %m - Server name */ 98 #define MBN_TRANSFERCOMPLETE "TransferComplete" /* - No message */ 99 #define MBN_TRANSFERDONE "TransferDone" /* %p %d %f %g - Full path with file name */ 100 #define MBN_TRANSFERFAILED "TransferFailed" /* %p %d %f %g - Full path with file name */ 101 #define MBN_TRANSFERABORTED "TransferAborted" /* %p %d %f %g - Full path with file name */ 102 #define MBN_OPERATIONDONE "OperationDone" /* %m - Name of finished operation (e.g. "Defragmentation complete") */ 103 #define MBN_UPDATEAVAILABLE "UpdateAvailable" /* %m - Name of the available update (e.g. application name) */ 104 #define MBN_WEBNOTIFICATION "WebNotification" /* %m - Message contains plain web notification */ 105 #define MBN_SCREENSHOT "ScreenShot" /* %p %d %f %g - Full path with file name */ 106 #define MBN_WINDOWSHOT "WindowShot" /* %p %d %f %g - Full path with file name */ 107 #define MBN_CLIPBOARDADDED "ClipboardAdded" /* %m - Clipboard unit the data was stored */ 108 #define MBN_CLIPBOARDSCREENSHOT "ClipboardScreenShot" /* %m - Clipboard unit the image was stored */ 109 #define MBN_CLIPBOARDWINDOWSHOT "ClipboardWindowShot" /* %m - Clipboard unit the image was stored */ 110 #define MBN_CLIPBOARDPASSWORD "ClipboardPassword" /* %m - Clipboard unit the password was stored */ 111 #define MBN_CLIPBOARDPASSWORDREMOVED "ClipboardPasswordRemoved" /* %m - Clipboard unit the password was removed from */ 112 #define MBN_CALLINCOMING "CallIncoming" /* %m - Callers number followed by \n<name>. "0556511223344\nJim Panse\nOptional stuff" */ 113 #define MBN_CALLOUTGOING "CallOutgoing" /* %m - Called number followed by \n<name>. "0556511223344\nJim Panse\nOptional stuff" */ 114 #define MBN_CALLDONE "CallDone" /* %m - Information on the finished call if possible */ 115 #define MBN_WIFICONNECTED "WiFiConnected" /* %m - SSID of the wireless network */ 116 #define MBN_WIFIDISCONNECTED "WiFiDisconnected" /* %m - SSID of the wireless network */ 117 #define MBN_WIFICONNECTIONFAILED "WiFiConnetionFailed" /* %m - SSID of the wireless network */ 118 #define MBN_SMARTWARN "SmartWarn" /* %m - Information on the failing drive */ 119 120 /*************************************************************************/ 121 122 #endif /* LIBRARIES_MAGICBEACON_H */