diff options
Diffstat (limited to 'src/mongo/db/dbmessage.h')
-rw-r--r-- | src/mongo/db/dbmessage.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/mongo/db/dbmessage.h b/src/mongo/db/dbmessage.h index f43e1de54d2..a8ee7a7638c 100644 --- a/src/mongo/db/dbmessage.h +++ b/src/mongo/db/dbmessage.h @@ -20,9 +20,9 @@ #include "mongo/bson/bson_validate.h" #include "mongo/client/constants.h" -#include "mongo/db/instance.h" #include "mongo/db/jsobj.h" #include "mongo/util/net/message.h" +#include "mongo/util/net/message_port.h" namespace mongo { @@ -129,9 +129,6 @@ namespace mongo { const char * getns() const { return data; } - void getns(Namespace& ns) const { - ns = data; - } const char * afterNS() const { return data + strlen( data ) + 1; @@ -267,6 +264,20 @@ namespace mongo { } }; + /** + * A response to a DbMessage. + */ + struct DbResponse { + Message *response; + MSGID responseTo; + string exhaustNS; /* points to ns if exhaust mode. 0=normal mode*/ + DbResponse(Message *r, MSGID rt) : response(r), responseTo(rt){ } + DbResponse() { + response = 0; + } + ~DbResponse() { delete response; } + }; + void replyToQuery(int queryResultFlags, AbstractMessagingPort* p, Message& requestMsg, void *data, int size, |