Backup


Data Structures

struct  GSM_SMS_Backup
struct  GSM_Backup
struct  GSM_Backup_Info

Defines

#define GSM_BACKUP_MAX_PHONEPHONEBOOK   1001
#define GSM_BACKUP_MAX_SIMPHONEBOOK   251
#define GSM_BACKUP_MAX_CALLER   20
#define GSM_BACKUP_MAX_SMSC   10
#define GSM_BACKUP_MAX_WAPBOOKMARK   40
#define GSM_BACKUP_MAX_WAPSETTINGS   30
#define GSM_BACKUP_MAX_MMSSETTINGS   30
#define GSM_BACKUP_MAX_SYNCMLSETTINGS   30
#define GSM_BACKUP_MAX_CHATSETTINGS   30
#define GSM_BACKUP_MAX_RINGTONES   30
#define GSM_BACKUP_MAX_PROFILES   10
#define GSM_BACKUP_MAX_FMSTATIONS   20
#define GSM_BACKUP_MAX_GPRSPOINT   10
#define GSM_BACKUP_MAX_NOTE   50

Enumerations

enum  GSM_BackupFormat {
  GSM_Backup_Auto = 0, GSM_Backup_AutoUnicode = 1, GSM_Backup_LMB, GSM_Backup_VCalendar,
  GSM_Backup_VCard, GSM_Backup_LDIF, GSM_Backup_ICS, GSM_Backup_Gammu,
  GSM_Backup_GammuUCS2
}

Functions

GSM_Error GSM_ReadSMSBackupFile (char *FileName, GSM_SMS_Backup *backup)
GSM_Error GSM_AddSMSBackupFile (char *FileName, GSM_SMS_Backup *backup)
void GSM_ClearSMSBackup (GSM_SMS_Backup *backup)
void GSM_FreeSMSBackup (GSM_SMS_Backup *backup)
GSM_Error GSM_SaveBackupFile (char *FileName, GSM_Backup *Backup, GSM_BackupFormat Format)
GSM_BackupFormat GSM_GuessBackupFormat (const char *FileName, const bool UseUnicode)
GSM_Error GSM_ReadBackupFile (char *FileName, GSM_Backup *backup, GSM_BackupFormat Format)
void GSM_ClearBackup (GSM_Backup *backup)
void GSM_FreeBackup (GSM_Backup *backup)
void GSM_GetBackupFormatFeatures (GSM_BackupFormat Format, GSM_Backup_Info *info)
void GSM_GetBackupFileFeatures (GSM_BackupFormat Format, GSM_Backup_Info *info, GSM_Backup *backup)

Detailed Description

Backups manipulations.

Define Documentation

#define GSM_BACKUP_MAX_CALLER   20

Maximal number of caller groups in backup.

Todo:
This should not be hardcoded.

Definition at line 107 of file gammu-backup.h.

#define GSM_BACKUP_MAX_CHATSETTINGS   30

Maximal number of chat settings in backup.

Todo:
This should not be hardcoded.

Definition at line 155 of file gammu-backup.h.

#define GSM_BACKUP_MAX_FMSTATIONS   20

Maximal number of FM stations in backup.

Todo:
This should not be hardcoded.

Definition at line 179 of file gammu-backup.h.

#define GSM_BACKUP_MAX_GPRSPOINT   10

Maximal number of GPRS points in backup.

Todo:
This should not be hardcoded.

Definition at line 187 of file gammu-backup.h.

#define GSM_BACKUP_MAX_MMSSETTINGS   30

Maximal number of MMS settings in backup.

Todo:
This should not be hardcoded.

Definition at line 139 of file gammu-backup.h.

#define GSM_BACKUP_MAX_NOTE   50

Maximal number of notes in backup.

Todo:
This should not be hardcoded.

Definition at line 195 of file gammu-backup.h.

#define GSM_BACKUP_MAX_PHONEPHONEBOOK   1001

Maximal number of phonebook entries in backup.

Todo:
This should not be hardcoded.

Definition at line 91 of file gammu-backup.h.

#define GSM_BACKUP_MAX_PROFILES   10

Maximal number of profiles in backup.

Todo:
This should not be hardcoded.

Definition at line 171 of file gammu-backup.h.

#define GSM_BACKUP_MAX_RINGTONES   30

Maximal number of ringtones in backup.

Todo:
This should not be hardcoded.

Definition at line 163 of file gammu-backup.h.

#define GSM_BACKUP_MAX_SIMPHONEBOOK   251

Maximal number of SIM entries in backup.

Todo:
This should not be hardcoded.

Definition at line 99 of file gammu-backup.h.

#define GSM_BACKUP_MAX_SMSC   10

Maximal number of SMSC in backup.

Todo:
This should not be hardcoded.

Definition at line 115 of file gammu-backup.h.

#define GSM_BACKUP_MAX_SYNCMLSETTINGS   30

Maximal number of SyncML settings in backup.

Todo:
This should not be hardcoded.

Definition at line 147 of file gammu-backup.h.

#define GSM_BACKUP_MAX_WAPBOOKMARK   40

Maximal number of WAP bookmarks in backup.

Todo:
This should not be hardcoded.

Definition at line 123 of file gammu-backup.h.

#define GSM_BACKUP_MAX_WAPSETTINGS   30

Maximal number of WAP settings in backup.

Todo:
This should not be hardcoded.

Definition at line 131 of file gammu-backup.h.


Enumeration Type Documentation

Backup data.

Enumerator:
GSM_Backup_Auto  Compatibility with old bool used instead of format.

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

GSM_Backup_AutoUnicode  Compatibility with old bool used instead of format.

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

GSM_Backup_LMB  LMB format, compatible with Logo manager, can store phonebooks and logos.
GSM_Backup_VCalendar  vCalendar standard, can store todo and calendar entries.
GSM_Backup_VCard  vCard standard, can store phone phonebook entries.
GSM_Backup_LDIF  LDIF (LDAP Data Interchange Format), can store phone phonebook entries.
GSM_Backup_ICS  iCalendar standard, can store todo and calendar entries.
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.

GSM_Backup_GammuUCS2  Gammu own format can store almost anything from phone.

This is UCS2-BE version of the format.

Definition at line 310 of file gammu-backup.h.


Function Documentation

GSM_Error GSM_AddSMSBackupFile ( char *  FileName,
GSM_SMS_Backup backup 
)

Adds data to SMS backup file.

Parameters:
FileName file name
backup structure holding backup data
Returns:
Error code

void GSM_ClearBackup ( GSM_Backup backup  ) 

Clears backup structure

Parameters:
backup structure where backup data will be stored

void GSM_ClearSMSBackup ( GSM_SMS_Backup backup  ) 

Clears SMS 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_FreeSMSBackup ( GSM_SMS_Backup backup  ) 

Deallocates all members of SMS backup structure

Parameters:
backup structure where backup data will be stored

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.

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.

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

Guesses backup format based on filename.

Parameters:
FileName Name of backup filename.
UseUnicode Whether to prefer unicode variant when guessing.
Returns:
Backup format on success -1 on error.

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

Reads data from backup file.

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.
Returns:
Error code

GSM_Error GSM_ReadSMSBackupFile ( char *  FileName,
GSM_SMS_Backup backup 
)

Reads SMS backup file.

Parameters:
FileName file name
backup structure where backup will be stored
Returns:
Error code

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

Save backup file.

Parameters:
FileName Name of file (format is detected from it).
Backup structure holding backup data
Format Backup format.
Returns:
Error code


Generated on Tue Jan 6 15:44:15 2009 for Gammu API by  doxygen 1.5.6