summaryrefslogtreecommitdiff
path: root/plugins/TrafficCounter/misc.h
diff options
context:
space:
mode:
authorVlad Mironov <mironych@googlemail.com>2012-09-20 12:00:44 +0000
committerVlad Mironov <mironych@googlemail.com>2012-09-20 12:00:44 +0000
commit9bd135eb5be03099a8cfbc81ac9903a97044ae0f (patch)
tree49f85c07edf86610f3b7d0e152dfb4e97b9a11f4 /plugins/TrafficCounter/misc.h
parent4ac4df14e007a71bf195183a92113e29f984e31c (diff)
Добавлен TrafficCounter
git-svn-id: http://svn.miranda-ng.org/main/trunk@1607 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TrafficCounter/misc.h')
-rw-r--r--plugins/TrafficCounter/misc.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/plugins/TrafficCounter/misc.h b/plugins/TrafficCounter/misc.h
new file mode 100644
index 0000000000..e8ac6c10ea
--- /dev/null
+++ b/plugins/TrafficCounter/misc.h
@@ -0,0 +1,32 @@
+typedef struct
+{
+ TCHAR Alignment; // Âûðàâíèâàíèå. L - ê ëåâîé ãðàíèöå, R - ê ïðàâîé.
+ WORD Interval; // Ðàññòîÿíèå, íà êîòîðîå ãðàíèöà ñòðîêè îòñòîèò îò ëåâîãî êðàÿ ôðåéìà.
+ TCHAR *String; // Ñîáñòâåííî ñòðîêà.
+} RowItemInfo;
+
+/* Ôóíêöèÿ ðàçáèðàåò ñòðîêó è âîçâðàùàåò ñïèñîê òåãîâ è ñîîòâåòñòâóþùèõ èì ñòðîê.
+Àðãóìåíòû:
+InputString - ñòðîêà äëÿ ðàçáîðà;
+RowItemsList - ñïèñîê íàéäåííûõ ýëåìåíòîâ.
+Âîçâðàùàåìîå çíà÷åíèå - êîëè÷åñòâî ýëåìåíòîâ â ñïèñêàõ. */
+WORD GetRowItems(TCHAR *InputString, RowItemInfo **RowItemsList);
+
+/* Ôóíêöèÿ âîçâðàùàåò êîëè÷åñòâî äíåé â óêàçàííîì ìåñÿöå óêàçàííîãî ãîäà. */
+BYTE DaysInMonth(BYTE Month, WORD Year);
+
+// Ôóíêöèÿ îïðåäåëÿåò äåíü íåäåëè ïî äàòå
+// 7 - ÂÑ, 1 - ÏÍ è ò. ä.
+BYTE DayOfWeek(BYTE Day, BYTE Month, WORD Year);
+
+/* Àðãóìåíòû:
+ Value - êîëè÷åñòâî áàéò;
+ Unit - åäèíèöû èçìåðåíèÿ (0 - áàéòû, 1 - êèëîáàéòû, 2 - ìåãàáàéòû, 3 - àâòîìàòè÷åñêè);
+ Buffer - àäðåñ ñòðîêè äëÿ çàïèñè ðåçóëüòàòà;
+ Size - ðàçìåð áóôåðà.
+Âîçâðàùàåìîå çíà÷åíèå: òðåáóåìûé ðàçìåð áóôåðà. */
+WORD GetFormattedTraffic(DWORD Value, BYTE Unit, TCHAR *Buffer, WORD Size);
+
+WORD GetDurationFormatM(DWORD Duration, TCHAR *Format, TCHAR *Buffer, WORD Size);
+
+signed short int TimeCompare(SYSTEMTIME st1, SYSTEMTIME st2); \ No newline at end of file