1 krisbash 1.1 #ifndef _provmgr_strand_helper_h
2 #define _provmgr_strand_helper_h
3 #include <ut/ut.h>
4 #include <pal/palcommon.h>
5 #include <pal/strings.h>
6 #include <provmgr/SubscriptionContext.h>
7 #include <provmgr/AggregationContext.h>
8 #include <provmgr/SubMgr.h>
9 #include <base/Strand.h>
10
11 PAL_BEGIN_EXTERNC
12 /*
13 * Generic StrandFT functions for faked interaction interface function tables.
14 * These functions are designed for re-use within the provmgr unit tests.
15 */
16
17 void ContextTest_Post_NO_OP( _In_ Strand* self_, _In_ Message* msg);
18 void ContextTest_PostControl_NO_OP( _In_ Strand* self, _In_ Message* msg);
19 void ContextTest_Ack_NO_OP( _In_ Strand* self );
20 void ContextTest_Cancel_NO_OP( _In_ Strand* self );
21 void ContextTest_Close_NO_OP( _In_ Strand* self_ );
22 krisbash 1.1 void ContextTest_Finish_NO_OP( _In_ Strand* self_ );
23 void ContextTest_Post_ImmediateAck( _In_ Strand* self_, _In_ Message* msg);
24 void ContextTest_Ack_ForSubscriptionContext( _In_ Strand* self_);
25 void ContextTest_Aux_PostLeft_ForSubscriptionContext( _In_ Strand* self_ );
26
27 /*
28 #ifdef _PREFAST_
29 #pragma prefast (pop)
30 #endif / * _PREFAST_ */
31
32 /*
33 * StrandFT functions and table for a faked "Left" side of an interaction.
34 */
35 extern StrandFT ContextTest_Left_InteractionFT;
36
37 /*
38 * StrandFT functions and table for a faked "Right" side of an interaction that
39 * sits within the SubscriptionContext's Context.
40 */
41 extern StrandFT ContextTest_Right_InteractionFT;
42
43 krisbash 1.1 /*
44 * StrandFT functions and table for a faked "Right" side of an interaction that
45 * sits within the SubscriptionContext's Context.
46 * It simulates the cancel function of SubscriptionContext
47 */
48 extern StrandFT SimSubscribeContext_Right_InteractionFT;
49
50 #define SERVER_EXCEEDED_LIMIT_MSG MI_T("server limits exceeded")
51
52 MI_Result CreateAndAddSubscriptionHelper(
53 SubscriptionManager* mgr,
54 Provider* provider,
55 InteractionOpenParams* interactionParams,
56 SubscriptionContext** subscrContext );
57
58 MI_Result Test_Provider_Init(
59 _Inout_ Provider* provider );
60
61 void Test_Provider_Finalize(
62 _In_ _Post_invalid_ Provider* provider );
63
64 krisbash 1.1 PAL_END_EXTERNC
65
66 #endif /* _provmgr_strand_helper_h */
67
|