Changeset View
Changeset View
Standalone View
Standalone View
plugins/sms/smsplugin.h
Show All 32 Lines | |||||
33 | 33 | | |||
34 | /** | 34 | /** | ||
35 | * Packet used to indicate a batch of messages has been pushed from the remote device | 35 | * Packet used to indicate a batch of messages has been pushed from the remote device | ||
36 | * | 36 | * | ||
37 | * The body should contain the key "messages" mapping to an array of messages | 37 | * The body should contain the key "messages" mapping to an array of messages | ||
38 | * | 38 | * | ||
39 | * For example: | 39 | * For example: | ||
40 | * { "messages" : [ | 40 | * { "messages" : [ | ||
41 | * { "event" : "sms", | 41 | * { "event" : 1, // 32-bit field containing a bitwise-or of event flags | ||
42 | * "messageBody" : "Hello", | 42 | * // See constants declared in SMSHelper.Message for defined | ||
43 | * "phoneNumber" : "2021234567", | 43 | * // values and explanations | ||
44 | * "messageDate" : "1518846484880", | 44 | * "body" : "Hello", // Text message body | ||
45 | * "messageType" : "2", | 45 | * "address" : "2021234567", // Sending or receiving address of the message | ||
46 | * "threadID" : "132" | 46 | * "date" : "1518846484880", // Timestamp of the message | ||
47 | * "type" : "2", // Compare with Android's | ||||
48 | * // Telephony.TextBasedSmsColumns.MESSAGE_TYPE_* | ||||
49 | * "thread_id" : "132" // Thread to which the message belongs | ||||
50 | * "read" : true // Boolean representing whether a message is read or unread | ||||
47 | * }, | 51 | * }, | ||
48 | * { ... }, | 52 | * { ... }, | ||
49 | * ... | 53 | * ... | ||
50 | * ] | 54 | * ] | ||
51 | * } | | |||
52 | */ | 55 | */ | ||
53 | #define PACKET_TYPE_SMS_MESSAGES QStringLiteral("kdeconnect.sms.messages") | 56 | #define PACKET_TYPE_SMS_MESSAGES QStringLiteral("kdeconnect.sms.messages") | ||
54 | 57 | | |||
55 | /** | 58 | /** | ||
56 | * Packet sent to request a message be sent | 59 | * Packet sent to request a message be sent | ||
57 | * | 60 | * | ||
58 | * This will almost certainly need to be replaced or augmented to support MMS, | 61 | * This will almost certainly need to be replaced or augmented to support MMS, | ||
59 | * but be sure the Android side remains compatible with old desktop apps! | 62 | * but be sure the Android side remains compatible with old desktop apps! | ||
▲ Show 20 Lines • Show All 73 Lines • Show Last 20 Lines |