class SmbAnswerCallback


Class Description

class SmbAnswerCallback
{
protected:
    char *lastAnswer;
public:
    SmbAnswerCallback();
    virtual ~SmbAnswerCallback();
// Overload this method to enable the library to have user feedback
    virtual char *getAnswer(int type, const char *optmessage);
};

This is a convenience class that you should overload. The getAnswer method is invoked when a answer is needed from the user. The arguments are:

type: One of the following types, that describe why this function was called.
ANSWER_USER_NAME: a user name is requested for the server in optmessage
ANSWER_USER_PASSWORD: a password for the user name in optmessage
ANSWER_SERVICE_PASSWORD: a password for the service (SMB share) in optmessage

optmessage: Additional data. It depends on type.

Note: lastAnswer is a variable that you can use to store the information. It will be deleted in the destructor if non 0.

See also :

Specify a callback for the library to get user answers (passwords, login names)
void setPasswordCallback(SmbAnswerCallback *getObject)

Copyright © Nicolas Brodu, 1999 - 2000