Gammu internals  1.38.0
gammu-memory.h
Go to the documentation of this file.
1 
7 #ifndef __gammu_memory_h
8 #define __gammu_memory_h
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
19 #include <gammu-datetime.h>
20 #include <gammu-limits.h>
21 #include <gammu-bitmap.h>
22 #include <gammu-debug.h>
23 
31 typedef enum {
35  MEM_ME = 1,
64 
69 
74 
79 
85 
95 #define GSM_MemoryTypeToString(x) \
96  ((x) == MEM_ME ? "ME" : \
97  ((x) == MEM_SM ? "SM" : \
98  ((x) == MEM_ON ? "ON" : \
99  ((x) == MEM_DC ? "DC" : \
100  ((x) == MEM_RC ? "RC" : \
101  ((x) == MEM_MC ? "MC" : \
102  ((x) == MEM_MT ? "MT" : \
103  ((x) == MEM_FD ? "FD" : \
104  ((x) == MEM_VM ? "VM" : \
105  ((x) == MEM_QD ? "QD" : \
106  ((x) == MEM_SL ? "SL" : "XX")))))))))))
107 
115 GSM_MemoryType GSM_StringToMemoryType(const char *s);
116 
123 typedef struct {
131  GSM_MemoryType MemoryType;
137 
144 typedef enum {
177  /*
178  * Second email. (Text)
179  */
341 } GSM_EntryType;
342 
348 typedef enum {
362 
368 typedef struct {
372  GSM_EntryType EntryType;
376  GSM_EntryLocation Location;
384  int Number;
388  int VoiceTag;
389  int SMSList[20];
391 
399  unsigned char Text[(GSM_PHONEBOOK_TEXT_LENGTH + 1) * 2];
405 
411 typedef struct {
415  GSM_MemoryType MemoryType;
419  int Location;
429 
435 typedef struct {
439  int Location;
447  GSM_MemoryType MemoryType;
452 } GSM_SpeedDial;
453 
467 
481 
497  gboolean start);
498 
510 
523 
535 
546 GSM_Error GSM_DeleteAllMemory(GSM_StateMachine * s, GSM_MemoryType MemoryType);
547 
559 
571 
582 unsigned char *GSM_PhonebookGetEntryName(const GSM_MemoryEntry * entry);
583 
595  int *Name, int *Number,
596  int *Group);
602 typedef enum {
627 
644 GSM_Error GSM_EncodeVCARD(GSM_Debug_Info * di, char *Buffer,
645  const size_t buff_len, size_t * Pos,
646  GSM_MemoryEntry * pbk, const gboolean header,
647  const GSM_VCardVersion Version);
648 
662 GSM_Error GSM_DecodeVCARD(GSM_Debug_Info * di, char *Buffer, size_t * Pos,
663  GSM_MemoryEntry * Pbk,
664  const GSM_VCardVersion Version);
665 
673 #ifdef __cplusplus
674 }
675 #endif
676 #endif
677 
678 /* Editor configuration
679  * vim: noexpandtab sw=8 ts=8 sts=8 tw=72:
680  */
GSM_Error GSM_SetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:547
GSM_Error GSM_EncodeVCARD(GSM_Debug_Info *di, char *Buffer, const size_t buff_len, size_t *Pos, GSM_MemoryEntry *pbk, const gboolean header, const GSM_VCardVersion Version)
Definition: gsmpbk.c:126
void GSM_PhonebookFindDefaultNameNumberGroup(const GSM_MemoryEntry *entry, int *Name, int *Number, int *Group)
Definition: gsmpbk.c:78
GSM_Error GSM_DeleteMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:575
GSM_MemoryType MemoryType
Definition: gammu-memory.h:415
#define GSM_PHONEBOOK_TEXT_LENGTH
Definition: gammu-limits.h:91
GSM_EntryLocation
Definition: gammu-memory.h:348
#define GSM_PHONEBOOK_ENTRIES
Definition: gammu-limits.h:98
GSM_Error GSM_GetNextMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry, gboolean start)
Definition: api.c:532
GSM_Error
Definition: gammu-error.h:23
void GSM_FreeMemoryEntry(GSM_MemoryEntry *Entry)
Definition: gsmpbk.c:1089
GSM_BinaryPicture Picture
Definition: gammu-memory.h:403
GSM_EntryType EntryType
Definition: gammu-memory.h:372
int gboolean
Definition: gammu-types.h:23
GSM_MemoryType
Definition: gammu-memory.h:31
GSM_Error GSM_GetSpeedDial(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: api.c:602
GSM_Error GSM_SetSpeedDial(GSM_StateMachine *s, GSM_SpeedDial *Speed)
Definition: api.c:615
GSM_Error GSM_GetMemoryStatus(GSM_StateMachine *s, GSM_MemoryStatus *status)
Definition: api.c:503
GSM_Error GSM_DecodeVCARD(GSM_Debug_Info *di, char *Buffer, size_t *Pos, GSM_MemoryEntry *Pbk, const GSM_VCardVersion Version)
Definition: gsmpbk.c:677
unsigned char * GSM_PhonebookGetEntryName(const GSM_MemoryEntry *entry)
Definition: gsmpbk.c:33
GSM_Error GSM_AddMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:561
GSM_MemoryType MemoryType
Definition: gammu-memory.h:447
GSM_DateTime Date
Definition: gammu-memory.h:380
GSM_MemoryType GSM_StringToMemoryType(const char *s)
Definition: gsmpbk.c:16
GSM_MemoryType MemoryType
Definition: gammu-memory.h:131
GSM_EntryLocation Location
Definition: gammu-memory.h:376
GSM_Error GSM_DeleteAllMemory(GSM_StateMachine *s, GSM_MemoryType MemoryType)
Definition: api.c:589
GSM_VCardVersion
Definition: gammu-memory.h:602
GSM_EntryType
Definition: gammu-memory.h:144
GSM_Error GSM_GetMemory(GSM_StateMachine *s, GSM_MemoryEntry *entry)
Definition: api.c:517