Backup

GSM_Error GSM_ReadSMSBackupFile(const char *FileName, GSM_SMS_Backup *backup)

Reads SMS backup file.

Return

Error code

Parameters
  • FileName: file name

  • backup: structure where backup will be stored

GSM_Error GSM_AddSMSBackupFile(const char *FileName, GSM_SMS_Backup *backup)

Adds data to SMS backup file.

Return

Error code

Parameters
  • FileName: file name

  • backup: structure holding backup data

void GSM_ClearSMSBackup(GSM_SMS_Backup *backup)

Clears SMS backup structure

Parameters
  • backup: structure where backup data will be stored

void GSM_FreeSMSBackup(GSM_SMS_Backup *backup)

Deallocates all members of SMS backup structure

Parameters
  • backup: structure where backup data will be stored

GSM_Error GSM_SaveBackupFile(char *FileName, GSM_Backup *Backup, GSM_BackupFormat Format)

Save backup file.

Return

Error code

Parameters
  • FileName: Name of file (format is detected from it).

  • Backup: structure holding backup data

  • Format: Backup format.

GSM_BackupFormat GSM_GuessBackupFormat(const char *FileName, const gboolean UseUnicode)

Guesses backup format based on filename.

Return

Backup format on success -1 on error.

Parameters
  • FileName: Name of backup filename.

  • UseUnicode: Whether to prefer unicode variant when guessing.

GSM_Error GSM_ReadBackupFile(const char *FileName, GSM_Backup *backup, GSM_BackupFormat Format)

Reads data from backup file.

Return

Error code

Parameters
  • FileName: Name of file (format is detected from it).

  • backup: structure where backup data will be stored

  • Format: Format of backup. For Gammu backups, unicode subformats are ignored.

void GSM_ClearBackup(GSM_Backup *backup)

Clears backup structure

Parameters
  • backup: structure where backup data will be stored

void GSM_FreeBackup(GSM_Backup *backup)

Deallocates all members of backup structure

Parameters
  • backup: structure where backup data will be stored

void GSM_GetBackupFormatFeatures(GSM_BackupFormat Format, GSM_Backup_Info *info)

Gets information about format features.

Parameters
  • Format: Format of backup.

  • info: Output information about backup features.

void GSM_GetBackupFileFeatures(GSM_BackupFormat Format, GSM_Backup_Info *info, GSM_Backup *backup)

Gets information about backup data features (resp. which data it contains).

Parameters
  • Format: Format of backup.

  • info: Output information about backup features.

  • backup: Backup data to chech.

struct GSM_SMS_Backup

SMS backup data.

Public Members

GSM_SMSMessage *SMS[GSM_BACKUP_MAX_SMS + 1]

List of SMS messages.

struct GSM_Backup

Backup data.

Public Members

char IMEI[GSM_MAX_IMEI_LENGTH]

IMEI of phone which has been backed up

char Model[GSM_MAX_MODEL_LENGTH + GSM_MAX_VERSION_LENGTH]

Model of phone which has been backed up

char Creator[80]

Name of program which created backup

GSM_DateTime DateTime

Timestamp of backup

gboolean DateTimeAvailable

Whether timestamp is present

char MD5Original[100]

Original MD5 of backup from file

char MD5Calculated[100]

Calculated MD5 of backup

GSM_MemoryEntry *PhonePhonebook[GSM_BACKUP_MAX_PHONEPHONEBOOK + 1]

Phone phonebook

GSM_MemoryEntry *SIMPhonebook[GSM_BACKUP_MAX_SIMPHONEBOOK + 1]

SIM phonebook

GSM_CalendarEntry *Calendar[GSM_MAXCALENDARTODONOTES + 1]

Calendar

GSM_Bitmap *CallerLogos[GSM_BACKUP_MAX_CALLER + 1]

Caller logos

GSM_SMSC *SMSC[GSM_BACKUP_MAX_SMSC + 1]

SMS configuration

GSM_WAPBookmark *WAPBookmark[GSM_BACKUP_MAX_WAPBOOKMARK + 1]

WAP bookmarks

GSM_MultiWAPSettings *WAPSettings[GSM_BACKUP_MAX_WAPSETTINGS + 1]

WAP settings

GSM_MultiWAPSettings *MMSSettings[GSM_BACKUP_MAX_MMSSETTINGS + 1]

MMS settings

GSM_SyncMLSettings *SyncMLSettings[GSM_BACKUP_MAX_SYNCMLSETTINGS + 1]

SyncMC settings

GSM_ChatSettings *ChatSettings[GSM_BACKUP_MAX_CHATSETTINGS + 1]

Chat settings

GSM_Ringtone *Ringtone[GSM_BACKUP_MAX_RINGTONES + 1]

Ringtones

GSM_ToDoEntry *ToDo[GSM_MAXCALENDARTODONOTES + 1]

To do tasks

GSM_Profile *Profiles[GSM_BACKUP_MAX_PROFILES + 1]

Progiles

GSM_FMStation *FMStation[GSM_BACKUP_MAX_FMSTATIONS + 1]

FM stations

GSM_GPRSAccessPoint *GPRSPoint[GSM_BACKUP_MAX_GPRSPOINT + 1]

GPRS configurations

GSM_NoteEntry *Note[GSM_BACKUP_MAX_NOTE + 1]

Notes

Statup logo

Operator logo

enum GSM_BackupFormat

Backup data.

Values:

enumerator GSM_Backup_Auto

Compatibility with old gboolean used instead of format.

File type is guessed for extension, non unicode format used for Gammu backup.

enumerator GSM_Backup_AutoUnicode

Compatibility with old gboolean used instead of format.

File type is guessed for extension, unicode format used for Gammu backup.

enumerator GSM_Backup_LMB

LMB format, compatible with Logo manager, can store phonebooks and logos.

enumerator GSM_Backup_VCalendar

vCalendar standard, can store todo and calendar entries.

enumerator GSM_Backup_VCard

vCard standard, can store phone phonebook entries.

enumerator GSM_Backup_LDIF

LDIF (LDAP Data Interchange Format), can store phone phonebook entries.

enumerator GSM_Backup_ICS

iCalendar standard, can store todo and calendar entries.

enumerator GSM_Backup_Gammu

Gammu own format can store almost anything from phone.

This is ASCII version of the format, Unicode strings are HEX encoded. Use GSM_Backup_GammuUCS2 instead if possible.

enumerator GSM_Backup_GammuUCS2

Gammu own format can store almost anything from phone.

This is UCS2-BE version of the format.

enumerator GSM_Backup_VNote

vNote standard, can store phone notes.

struct GSM_Backup_Info

Information about supported backup features.

GSM_BACKUP_MAX_SMS

Maximal number of SMSes in backup.

Todo:

This should not be hardcoded.