]> git.sur5r.net Git - openldap/blob - contrib/ldapc++/src/SaslInteraction.h
Helper Classes to handle cyrus-sasl interactions
[openldap] / contrib / ldapc++ / src / SaslInteraction.h
1 /*
2  * Copyright 2007, OpenLDAP Foundation, All Rights Reserved.
3  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
4  */
5
6 #ifndef SASL_INTERACTION_H
7 #define SASL_INTERACTION_H
8
9 #include <string>
10 #include <sasl/sasl.h>
11
12 class SaslInteraction {
13     public:
14         SaslInteraction( sasl_interact_t *interact );
15         ~SaslInteraction();
16         unsigned long getId() const;
17         const std::string getPrompt() const;
18         const std::string getChallenge() const;
19         const std::string getDefaultResult() const;
20
21         void setResult(const std::string &res);
22
23     private:
24         sasl_interact_t *m_interact;
25         std::string m_result;
26
27 };
28 #endif /* SASL_INTERACTION_H */