summaryrefslogtreecommitdiff
path: root/docs/man/gammu-smsd-sql.7
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2013-05-29 12:09:01 +0200
committerMichal Čihař <michal@cihar.com>2013-05-29 12:09:01 +0200
commitcc61e5d2d9af23c37cd4994de9e3e22f25971d1a (patch)
treea25bf14435414fe56cd5baaa7b6ad17a688ad69c /docs/man/gammu-smsd-sql.7
parent7f4f7fac63eb2a0d7e022808653533567160993e (diff)
Imported Upstream version 1.33.0
Diffstat (limited to 'docs/man/gammu-smsd-sql.7')
-rw-r--r--docs/man/gammu-smsd-sql.791
1 files changed, 84 insertions, 7 deletions
diff --git a/docs/man/gammu-smsd-sql.7 b/docs/man/gammu-smsd-sql.7
index b584f55..331fbfc 100644
--- a/docs/man/gammu-smsd-sql.7
+++ b/docs/man/gammu-smsd-sql.7
@@ -1,4 +1,4 @@
-.TH "GAMMU-SMSD-SQL" "7" "June 27, 2012" "1.32.0" "Gammu"
+.TH "GAMMU-SMSD-SQL" "7" "May 29, 2013" "1.33.0" "Gammu"
.SH NAME
gammu-smsd-sql \- gammu-smsd(1) backend using SQL abstraction layer to use any supported database as a message storage
.
@@ -28,7 +28,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
..
-.\" Man page generated from reStructeredText.
+.\" Man page generated from reStructuredText.
.
.SH DESCRIPTION
.sp
@@ -82,10 +82,13 @@ Specific for DBI:
.IP \(bu 2
\fBDBDir\fP \- sqlite/sqlite3 directory with database
.UNINDENT
+.INDENT 0.0
+.INDENT 3.5
.IP "See also"
.sp
The variables are fully described in \fIgammurc\fP documentation.
-.RE
+.UNINDENT
+.UNINDENT
.SH SQL QUERIES
.sp
Almost all queries are configurable. You can edit them in
@@ -167,6 +170,8 @@ are selected for default queries during initialization.
Deletes phone from database.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -174,19 +179,25 @@ DELETE FROM phones WHERE IMEI = %I
.ft P
.fi
.UNINDENT
+.UNINDENT
+.UNINDENT
.INDENT 0.0
.TP
.B insert_phone
Inserts phone to database.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
-INSERT INTO phones (IMEI, ID, Send, Receive, InsertIntoDB, TimeOut, Client, Battery, SignalStrength)
+INSERT INTO phones (IMEI, ID, Send, Receive, InsertIntoDB, TimeOut, Client, Battery, Signal)
VALUES (%I, %P, %1, %2, NOW(), (NOW() + INTERVAL 10 SECOND) + 0, %N, \-1, \-1)
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -204,6 +215,8 @@ enable receive (yes or no) \- configuration option Receive
Select message for update delivery status.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -212,18 +225,24 @@ WHERE DeliveryDateTime IS NULL AND SenderID = %P AND TPMR = %t AND DestinationNu
.ft P
.fi
.UNINDENT
+.UNINDENT
+.UNINDENT
.INDENT 0.0
.TP
.B save_inbox_sms_update_delivered
Update message delivery status if message was delivered.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
UPDATE sentitems SET DeliveryDateTime = %C, Status = %1, StatusError = %e WHERE ID = %2 AND TPMR = %t
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -241,12 +260,16 @@ ID of message
Update message if there is an delivery error.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
UPDATE sentitems SET Status = %1, StatusError = %e WHERE ID = %2 AND TPMR = %t
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -264,6 +287,8 @@ ID of message
Insert received message.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -272,12 +297,16 @@ Class, TextDecoded, RecipientID) VALUES (%d, %E, %R, %c, %F, %u, %x, %T, %P)
.ft P
.fi
.UNINDENT
+.UNINDENT
+.UNINDENT
.INDENT 0.0
.TP
.B update_received
Update statistics after receiving message.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -285,19 +314,28 @@ UPDATE phones SET Received = Received + 1 WHERE IMEI = %I
.ft P
.fi
.UNINDENT
+.UNINDENT
+.UNINDENT
.INDENT 0.0
.TP
.B refresh_send_status
Update messages in outbox.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
-UPDATE outbox SET SendingTimeOut = (NOW() + INTERVAL locktime SECOND) + 0
+UPDATE outbox SET SendingTimeOut = (NOW() + INTERVAL 60 SECOND) + 0
WHERE ID = %1 AND (SendingTimeOut < NOW() OR SendingTimeOut IS NULL)
.ft P
.fi
+.UNINDENT
+.UNINDENT
+.sp
+The default query calculates sending timeout based on \fBLoopSleep\fP
+value.
.sp
Query specific parameters:
.INDENT 7.0
@@ -312,6 +350,8 @@ ID of message
Find sms messages for sending.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -321,6 +361,8 @@ SendBefore >= CURTIME() AND SendAfter <= CURTIME() AND
( SenderID is NULL OR SenderID = \(aq\(aq OR SenderID = %P ) ORDER BY InsertIntoDB ASC LIMIT %1
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -335,6 +377,8 @@ limit of sms messages sended in one walk in loop
Select body of message.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -342,6 +386,8 @@ SELECT Text, Coding, UDH, Class, TextDecoded, ID, DestinationNumber, MultiPart,
RelativeValidity, DeliveryReport, CreatorID FROM outbox WHERE ID=%1
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -356,6 +402,8 @@ ID of message
Select remaining parts of sms message.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -363,6 +411,8 @@ SELECT Text, Coding, UDH, Class, TextDecoded, ID, SequencePosition
FROM outbox_multipart WHERE ID=%1 AND SequencePosition=%2
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -380,12 +430,16 @@ Number of multipart message
Remove messages from outbox after threir successful send.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
DELETE FROM outbox WHERE ID=%1
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -400,12 +454,16 @@ ID of message
Remove messages from outbox_multipart after threir successful send.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
DELETE FROM outbox_multipart WHERE ID=%1
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -420,6 +478,8 @@ ID of message
Create message (insert to outbox).
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -428,6 +488,8 @@ InsertIntoDB, Text, DestinationNumber, RelativeValidity, Coding, UDH, Class,
TextDecoded) VALUES (%1, %P, %2, %3, NOW(), %E, %R, %V, %c, %u, %x, %T)
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -454,6 +516,8 @@ ID of message
Create message remaining parts.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -461,6 +525,8 @@ INSERT INTO outbox_multipart (SequencePosition, Text, Coding, UDH, Class,
TextDecoded, ID) VALUES (%4, %E, %c, %u, %x, %T, %5)
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -487,6 +553,8 @@ ID of message
Insert to sentitems.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -496,6 +564,8 @@ InsertIntoDB,RelativeValidity)
VALUES (%A, %1, %2, %3, NOW(), %F, %4, %P, %E, %R, %c, %u, %x, %T, %5, %V)
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -522,6 +592,8 @@ time when inserted in db
Update sent statistics after sending message.
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
@@ -529,19 +601,25 @@ UPDATE phones SET Sent= Sent + 1 WHERE IMEI = %I
.ft P
.fi
.UNINDENT
+.UNINDENT
+.UNINDENT
.INDENT 0.0
.TP
.B refresh_phone_status
Update phone status (battery, signal).
.sp
Default value:
+.INDENT 7.0
+.INDENT 3.5
.sp
.nf
.ft C
UPDATE phones SET TimeOut= (NOW() + INTERVAL 10 SECOND) + 0,
-Battery = %1, SignalStrength = %2 WHERE IMEI = %I
+Battery = %1, Signal = %2 WHERE IMEI = %I
.ft P
.fi
+.UNINDENT
+.UNINDENT
.sp
Query specific parameters:
.INDENT 7.0
@@ -558,5 +636,4 @@ Michal Čihař <michal@cihar.com>
.SH COPYRIGHT
2009-2012, Michal Čihař <michal@cihar.com>
.\" Generated by docutils manpage writer.
-.\"
.