63 /** |
63 /** |
64 * Launch editor for creating a new contact with a given detail. |
64 * Launch editor for creating a new contact with a given detail. |
65 * @param definitionName The field type |
65 * @param definitionName The field type |
66 * @param value The value for the field. |
66 * @param value The value for the field. |
67 * @param aServiceProvider The service provider |
67 * @param aServiceProvider The service provider |
|
68 * @param defaultForOnlineAccountIsImpp If no subtype is given, default |
|
69 * for QContactOnlineAccount is QContactOnlineAccount::SubTypeImpp. If false, then |
|
70 * the default is QContactOnlineAccount::SubTypeSipVoip. |
68 */ |
71 */ |
69 void editCreateNew(const QString &definitionName, const QString &value, |
72 void editCreateNew(const QString &definitionName, const QString &value, |
70 CntAbstractServiceProvider& aServiceProvider ); |
73 CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp = true ); |
|
74 |
|
75 /** |
|
76 * Launch editor for creating a new contact with a given detail and subtype. |
|
77 * If the given subtype string is empty, then QContactPhoneNumber::SubTypeMobile is used. |
|
78 * @param definitionName The field type |
|
79 * @param value The value for the field. |
|
80 * @param subType The subtype for the field. (for eg. QContactPhoneNumber::SubTypeLandline) |
|
81 * @param aServiceProvider The service provider |
|
82 * @param defaultForOnlineAccountIsImpp If no subtype is given, default |
|
83 * for QContactOnlineAccount is QContactOnlineAccount::SubTypeImpp. If false, then |
|
84 * the default is QContactOnlineAccount::SubTypeSipVoip. |
|
85 */ |
|
86 void editCreateNew(const QString &definitionName, const QString &value, const QString& subType, |
|
87 CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp = true ); |
71 |
88 |
72 /** |
89 /** |
73 * Launch editor for creating a new contact based on vCard file indicated in arg. |
90 * Launch editor for creating a new contact based on vCard file indicated in arg. |
74 * @param vCardFile The vCard file name and path. |
91 * @param vCardFile The vCard file name and path. |
75 * @param aServiceProvider The service provider |
92 * @param aServiceProvider The service provider |
83 * @param definitionName The field type |
100 * @param definitionName The field type |
84 * @param value The value for the field. |
101 * @param value The value for the field. |
85 * @param aServiceProvider The service provider |
102 * @param aServiceProvider The service provider |
86 */ |
103 */ |
87 void editUpdateExisting(const QString &definitionName, const QString &value, |
104 void editUpdateExisting(const QString &definitionName, const QString &value, |
88 CntAbstractServiceProvider& aServiceProvider ); |
105 CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp = true ); |
|
106 |
|
107 /** |
|
108 * User can first choose a contact, and then an editor is opened. |
|
109 * A new detail is provided by caller and it will be prefilled in the editor. |
|
110 * @param definitionName The field type |
|
111 * @param value The value for the field. |
|
112 * @param subType The subtype for the field. (for eg. QContactPhoneNumber::SubTypeLandline) |
|
113 * @param aServiceProvider The service provider |
|
114 * @param defaultForOnlineAccountIsImpp If no subtype is given, default |
|
115 * for QContactOnlineAccount is QContactOnlineAccount::SubTypeImpp. If false, then |
|
116 * the default is QContactOnlineAccount::SubTypeSipVoip. |
|
117 */ |
|
118 void editUpdateExisting(const QString &definitionName, const QString &value, const QString& subType, |
|
119 CntAbstractServiceProvider& aServiceProvider, bool defaultForOnlineAccountIsImpp = true ); |
89 |
120 |
90 /** |
121 /** |
91 * Open the editor for an existing contact.' |
122 * Open the editor for an existing contact.' |
92 * @param contactId |
123 * @param contactId |
93 * @param aServiceProvider The service provider |
124 * @param aServiceProvider The service provider |
111 */ |
142 */ |
112 void launchTemporaryContactCard(const QString &definitionName, const QString &value, |
143 void launchTemporaryContactCard(const QString &definitionName, const QString &value, |
113 CntAbstractServiceProvider& aServiceProvider ); |
144 CntAbstractServiceProvider& aServiceProvider ); |
114 |
145 |
115 /** |
146 /** |
116 * Set the flag that allows quiting the application explicitly |
147 * Set the flag that allows quitting the application explicitly |
117 * using the quitApp slot. By default the value is always true. |
148 * using the quitApp slot. By default the value is always true. |
118 */ |
149 */ |
119 void setQuitable(bool quitable); |
150 void setQuittable(bool quittable); |
120 |
151 |
121 public slots: |
152 public slots: |
122 /** |
153 /** |
123 * Quit the application |
154 * Quit the application |
124 */ |
155 */ |
125 void quitApp(); |
156 void quitApp(); |
|
157 /** |
|
158 * Terminate a service |
|
159 */ |
|
160 void terminateService(); |
126 |
161 |
127 private: |
162 private: |
128 void removeNotSupportedFields(QContact& contact); |
163 void removeNotSupportedFields(QContact& contact); |
129 void removeNotSupportedDetails(QContact& contact); |
164 void removeNotSupportedDetails(QContact& contact); |
|
165 void fillOnlineAccount( QContactOnlineAccount& account, const QString& value, const QString& subType, bool defaultForOnlineAccountIsImpp); |
130 |
166 |
131 private: // from CntAbstractServiceProvider |
167 private: // from CntAbstractServiceProvider |
132 void CompleteServiceAndCloseApp(const QVariant& retValue); |
168 void CompleteServiceAndCloseApp(const QVariant& retValue); |
133 private: |
169 private: |
134 CntAbstractViewManager* mViewManager; // not owned |
170 CntAbstractViewManager* mViewManager; // not owned |
135 QStringList m_definitionNames; |
171 QStringList m_definitionNames; |
136 CntAbstractServiceProvider* mCurrentProvider; // not owned |
172 CntAbstractServiceProvider* mCurrentProvider; // not owned |
137 bool mIsQuitable; |
173 bool mIsQuittable; |
138 }; |
174 }; |
139 |
175 |
140 #endif /* CNTSERVICES_H */ |
176 #endif /* CNTSERVICES_H */ |