qtmobility/src/versit/qversitcontactimporter.h
changeset 4 90517678cc4f
parent 1 2b40d63a9c3d
child 11 06b8e2af4411
equal deleted inserted replaced
1:2b40d63a9c3d 4:90517678cc4f
    71 };
    71 };
    72 
    72 
    73 class Q_VERSIT_EXPORT QVersitContactImporter
    73 class Q_VERSIT_EXPORT QVersitContactImporter
    74 {
    74 {
    75 public:
    75 public:
       
    76     enum Error {
       
    77         NoError = 0,
       
    78         InvalidDocumentError,
       
    79         EmptyDocumentError
       
    80     };
       
    81 
    76     QVersitContactImporter();
    82     QVersitContactImporter();
    77     ~QVersitContactImporter();
    83     ~QVersitContactImporter();
    78 
    84 
    79     // XXX We need some way of importing/exporting groups and "self-contact" from vCard.
    85     bool importDocuments(const QList<QVersitDocument>& documents);
    80     QList<QContact> importContacts(const QList<QVersitDocument>& documents);
    86     QList<QContact> contacts() const;
       
    87     QMap<int, Error> errors() const;
    81 
    88 
    82     void setPropertyHandler(QVersitContactImporterPropertyHandler* handler);
    89     void setPropertyHandler(QVersitContactImporterPropertyHandler* handler);
    83     QVersitContactImporterPropertyHandler* propertyHandler() const;
    90     QVersitContactImporterPropertyHandler* propertyHandler() const;
    84 
    91 
    85     void setResourceHandler(QVersitResourceHandler* handler);
    92     void setResourceHandler(QVersitResourceHandler* handler);