MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / ~Message

Function ~Message

src/auth/SecureRemotePassword/Message.h:54–109  ·  view source on GitHub ↗

This class helps to exchange values with a message

Source from the content-addressed store, hash-verified

52
53// This class helps to exchange values with a message
54class Message
55// : public AutoStorage
56{
57public:
58 Message(Firebird::IMessageMetadata* aMeta = NULL)
59#ifdef INTERNAL_FIREBIRD
60 : s(&st),
61#else
62 : s(fb_get_master_interface()->getStatus()),
63#endif
64 metadata(NULL),
65 buffer(NULL),
66 builder(NULL),
67 fieldCount(0),
68 fieldList(NULL),
69 statusWrapper(s)
70 {
71 try
72 {
73 if (aMeta)
74 {
75 createBuffer(aMeta);
76 metadata = aMeta;
77 metadata->addRef();
78 }
79 else
80 {
81 Firebird::IMetadataBuilder* bld =
82#ifdef INTERNAL_FIREBIRD
83 Firebird::MasterInterfacePtr()->
84#else
85 fb_get_master_interface()->
86#endif
87 getMetadataBuilder(&statusWrapper, 0);
88 check(&statusWrapper);
89 builder = bld;
90 }
91 }
92 catch (...)
93 {
94 s->dispose();
95 throw;
96 }
97 }
98
99 ~Message()
100 {
101 delete[] buffer;
102#ifndef INTERNAL_FIREBIRD
103 s->dispose();
104#endif
105 if (builder)
106 builder->release();
107 if (metadata)
108 metadata->release();
109 }
110
111public:

Callers

nothing calls this directly

Calls 2

disposeMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected