author | zecke <zecke> | 2004-11-18 21:45:49 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-11-18 21:45:49 (UTC) |
commit | 7484344ff5be1f7c54e51715776d0e3cadeb1ed0 (patch) (unidiff) | |
tree | 96f427f7a1fb1c8ca0a6efbd72b51e916cb1651d /libopie2/opiepim/core/ocontactaccess.h | |
parent | 3302eb30390e6053637929316670da3e8fbe279e (diff) | |
download | opie-7484344ff5be1f7c54e51715776d0e3cadeb1ed0.zip opie-7484344ff5be1f7c54e51715776d0e3cadeb1ed0.tar.gz opie-7484344ff5be1f7c54e51715776d0e3cadeb1ed0.tar.bz2 |
Big PIM API Update Core Part (1/2 of what should be implemented):
OPimRecords:
-Add a so called safeCast using the rtti value
OPimTodo:
-Fix memleak with OPimState
OPimOccurrence:
-New class. Every 'Access' can give occurrences
for a period of time
Move Documentation
Diffstat (limited to 'libopie2/opiepim/core/ocontactaccess.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.h | 57 |
1 files changed, 25 insertions, 32 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h index 4429b6f..691ece2 100644 --- a/libopie2/opiepim/core/ocontactaccess.h +++ b/libopie2/opiepim/core/ocontactaccess.h | |||
@@ -60,6 +60,26 @@ class OPimContactAccess: public QObject, public OPimAccessTemplate<OPimContact> | |||
60 | Q_OBJECT | 60 | Q_OBJECT |
61 | 61 | ||
62 | public: | 62 | public: |
63 | enum SortFilter { | ||
64 | DoNotShowNoneChildren = FilterCustom<<1, | ||
65 | DoNotShowNoneAnniversary = FilterCustom<<2, | ||
66 | DoNotShowNoneBirthday = FilterCustom<<3, | ||
67 | DoNotShowNoHomeAddress = FilterCustom<<4, | ||
68 | DoNotShowNoBusinessAddress = FilterCustom<<5 | ||
69 | }; | ||
70 | |||
71 | enum SortOrder { | ||
72 | SortTitle = SortCustom, | ||
73 | SortFirstName, | ||
74 | SortMiddleName, | ||
75 | SortSuffix, | ||
76 | SortEmail, | ||
77 | SortNickname, | ||
78 | SortAnniversary, | ||
79 | SortBirthday, | ||
80 | SortGender | ||
81 | }; | ||
82 | |||
63 | /** | 83 | /** |
64 | * Create Database with contacts (addressbook). | 84 | * Create Database with contacts (addressbook). |
65 | * @param appname Name of application which wants access to the database | 85 | * @param appname Name of application which wants access to the database |
@@ -75,34 +95,9 @@ class OPimContactAccess: public QObject, public OPimAccessTemplate<OPimContact> | |||
75 | * @see OPimContactAccessBackend | 95 | * @see OPimContactAccessBackend |
76 | */ | 96 | */ |
77 | OPimContactAccess (const QString appname, const QString filename = 0l, | 97 | OPimContactAccess (const QString appname, const QString filename = 0l, |
78 | OPimContactAccessBackend* backend = 0l, bool handlesync = true); | 98 | OPimContactAccessBackend* backend = 0l, bool handlesync = true); |
79 | ~OPimContactAccess (); | 99 | ~OPimContactAccess (); |
80 | 100 | ||
81 | /** Constants for query. | ||
82 | * Use this constants to set the query parameters. | ||
83 | * Note: <i>query_IgnoreCase</i> just make sense with one of the other attributes ! | ||
84 | * @see queryByExample() | ||
85 | */ | ||
86 | enum QuerySettings { | ||
87 | WildCards = 0x0001, | ||
88 | IgnoreCase = 0x0002, | ||
89 | RegExp = 0x0004, | ||
90 | ExactMatch = 0x0008, | ||
91 | MatchOne = 0x0010, // Only one Entry must match | ||
92 | DateDiff = 0x0020, // Find all entries from today until given date | ||
93 | DateYear = 0x0040, // The year matches | ||
94 | DateMonth = 0x0080, // The month matches | ||
95 | DateDay = 0x0100, // The day matches | ||
96 | }; | ||
97 | |||
98 | |||
99 | /** Return all Contacts in a sorted manner. | ||
100 | * @param ascending true: Sorted in acending order. | ||
101 | * @param sortOrder Currently not implemented. Just defined to stay compatible to otodoaccess | ||
102 | * @param sortFilter Currently not implemented. Just defined to stay compatible to otodoaccess | ||
103 | * @param cat Currently not implemented. Just defined to stay compatible to otodoaccess | ||
104 | */ | ||
105 | List sorted( bool ascending, int sortOrder, int sortFilter, int cat ) const; | ||
106 | 101 | ||
107 | /** Return all possible settings. | 102 | /** Return all possible settings. |
108 | * @return All settings provided by the current backend | 103 | * @return All settings provided by the current backend |
@@ -126,9 +121,9 @@ class OPimContactAccess: public QObject, public OPimAccessTemplate<OPimContact> | |||
126 | * Save is more a "commit". After calling this function, all changes are public available. | 121 | * Save is more a "commit". After calling this function, all changes are public available. |
127 | * @return true if successful | 122 | * @return true if successful |
128 | */ | 123 | */ |
129 | bool save(); | 124 | bool save(); |
130 | 125 | ||
131 | /** | 126 | /** |
132 | * Return identification of used records | 127 | * Return identification of used records |
133 | */ | 128 | */ |
134 | int rtti() const; | 129 | int rtti() const; |
@@ -144,8 +139,6 @@ class OPimContactAccess: public QObject, public OPimAccessTemplate<OPimContact> | |||
144 | 139 | ||
145 | 140 | ||
146 | private: | 141 | private: |
147 | // class OPimContactAccessPrivate; | ||
148 | // OPimContactAccessPrivate* d; | ||
149 | OPimContactAccessBackend *m_backEnd; | 142 | OPimContactAccessBackend *m_backEnd; |
150 | bool m_loading:1; | 143 | bool m_loading:1; |
151 | 144 | ||