wrong character in the GSM 03.38 table (ç for Ç)
[gammu.git] / libgammu / service / gsmmisc.h
blob2f9a621453a26ef732bb457cc436eddd7519fc0a
1 /* (c) 2001-2005 by Marcin Wiacek, Walek and Michal Cihar */
3 #ifndef __gsm_misc_h
4 #define __gsm_misc_h
6 #include <gammu-file.h>
7 #include <gammu-info.h>
8 #include <gammu-memory.h>
10 /**
11 * Resets all members of GSM_BatteryCharge structure.
13 void GSM_ClearBatteryCharge(GSM_BatteryCharge *bat);
15 /**
16 * Prints a line (terminated with CRLF) to a buffer with error checking.
18 GSM_Error VC_StoreLine(char *Buffer, const size_t buff_len, size_t *Pos, const char *format, ...);
20 /**
21 * Prints a string to a buffer with error checking.
23 GSM_Error VC_Store(char *Buffer, const size_t buff_len, size_t *Pos, const char *format, ...);
25 gboolean ReadVCALDateTime(const char *Buffer, GSM_DateTime *dt);
26 GSM_Error VC_StoreDateTime(char *Buffer, const size_t buff_len, size_t *Length, const GSM_DateTime *Date, const char *Start);
28 gboolean ReadVCALDate(char *Buffer, const char *Start, GSM_DateTime *Date, gboolean *is_date_only);
29 GSM_Error VC_StoreDate(char *Buffer, const size_t buff_len, size_t *Length, const GSM_DateTime *Date, const char *Start);
31 /**
32 * Store base64 encoded string to buffer.
34 GSM_Error VC_StoreBase64(char *Buffer, const size_t buff_len, size_t *Pos, const unsigned char *data, const size_t length);
36 /**
37 * Stores text in vCalendar/vCard formatted buffer.
39 * \param[out] Buffer Buffer where output will be stored.
40 * \param[in] buff_len Size of Buffer.
41 * \param[in,out] Length Current position in output buffer (will be updated).
42 * \param[in] Text Value to be stored.
43 * \param[in] Start Name of field which is being stored.
44 * \param[in] UTF8 Whether text should be stored in UTF-8 without prefix.
46 GSM_Error VC_StoreText(char *Buffer, const size_t buff_len, size_t *Length, const unsigned char *Text, const char *Start, const gboolean UTF8);
48 /**
49 * Reads text for vCalendar/vCard formatted line.
51 * \todo We should try to detect utf-8 and automatically use it.
53 * \param Buffer Buffer with input data.
54 * \param Start Start expression of line.
55 * \param Value Storage for value.
56 * \param UTF8 Whether string should be treated as utf-8.
58 gboolean ReadVCALText(char *Buffer, const char *Start, unsigned char *Value, const gboolean UTF8, GSM_EntryLocation *location);
60 gboolean ReadVCALInt(char *Buffer, const char *Start, int *Value);
62 unsigned char *VCALGetTextPart(unsigned char *Buff, int *pos);
64 #endif
66 /* How should editor hadle tabs in this file? Add editor commands here.
67 * vim: noexpandtab sw=8 ts=8 sts=8: