|
27 | 27 | // level direction or so. |
28 | 28 | typedef std::vector<std::pair<std::string, std::string>> notif_list_t; |
29 | 29 |
|
30 | | - |
31 | 30 | struct nixlBackendOptionalArgs { |
32 | 31 | // During postXfer, user might ask for a notification if supported |
33 | 32 | nixl_blob_t notifMsg; |
34 | | - bool hasNotif = false; |
| 33 | + bool hasNotif = false; |
35 | 34 | nixl_blob_t customParam; |
36 | 35 | }; |
37 | 36 |
|
38 | 37 | using nixl_opt_b_args_t = nixlBackendOptionalArgs; |
39 | 38 |
|
40 | | - |
41 | 39 | // A base class to point to backend initialization data |
42 | 40 | // User doesn't know about fields such as local_agent but can access it |
43 | 41 | // after the backend is initialized by agent. If we needed to make it private |
44 | 42 | // from the user, we should make nixlBackendEngine/nixlAgent friend classes. |
45 | 43 | class nixlBackendInitParams { |
46 | | - public: |
47 | | - std::string localAgent; |
| 44 | +public: |
| 45 | + std::string localAgent; |
48 | 46 |
|
49 | | - nixl_backend_t type; |
50 | | - nixl_b_params_t* customParams; |
| 47 | + nixl_backend_t type; |
| 48 | + nixl_b_params_t *customParams; |
51 | 49 |
|
52 | | - bool enableProgTh; |
53 | | - nixlTime::us_t pthrDelay; |
54 | | - nixl_thread_sync_t syncMode; |
55 | | - bool enableTelemetry_; |
| 50 | + bool enableProgTh; |
| 51 | + nixlTime::us_t pthrDelay; |
| 52 | + nixl_thread_sync_t syncMode; |
| 53 | + bool enableTelemetry_; |
56 | 54 | }; |
57 | 55 |
|
58 | 56 | // Pure virtual class to have a common pointer type |
59 | 57 | class nixlBackendReqH { |
60 | 58 | public: |
61 | | - nixlBackendReqH() { } |
62 | | - virtual ~nixlBackendReqH() { } |
| 59 | + nixlBackendReqH() {} |
| 60 | + |
| 61 | + virtual ~nixlBackendReqH() {} |
63 | 62 | }; |
64 | 63 |
|
65 | 64 | // Pure virtual class to have a common pointer type for different backendMD. |
66 | 65 | class nixlBackendMD { |
67 | | - protected: |
68 | | - bool isPrivateMD; |
| 66 | +protected: |
| 67 | + bool isPrivateMD; |
69 | 68 |
|
70 | | - public: |
71 | | - nixlBackendMD(bool isPrivate){ |
72 | | - isPrivateMD = isPrivate; |
73 | | - } |
| 69 | +public: |
| 70 | + nixlBackendMD(bool isPrivate) { |
| 71 | + isPrivateMD = isPrivate; |
| 72 | + } |
74 | 73 |
|
75 | | - virtual ~nixlBackendMD(){ |
76 | | - } |
| 74 | + virtual ~nixlBackendMD() {} |
77 | 75 | }; |
78 | 76 |
|
79 | 77 | // Each backend can have different connection requirement |
80 | 78 | // This class would include the required information to make |
81 | 79 | // a connection to a remote node. Note that local information |
82 | 80 | // is passed during the constructor and through BackendInitParams |
83 | 81 | class nixlBackendConnMD { |
84 | | - public: |
| 82 | +public: |
85 | 83 | // And some other details |
86 | 84 | std::string dstIpAddress; |
87 | | - uint16_t dstPort; |
| 85 | + uint16_t dstPort; |
88 | 86 | }; |
89 | 87 |
|
90 | 88 | // A pointer required to a metadata object for backends next to each BasicDesc |
91 | 89 | class nixlMetaDesc : public nixlBasicDesc { |
92 | | - public: |
93 | | - // To be able to point to any object |
94 | | - nixlBackendMD* metadataP; |
| 90 | +public: |
| 91 | + // To be able to point to any object |
| 92 | + nixlBackendMD *metadataP; |
95 | 93 |
|
96 | | - // Reuse parent constructor without the metadata pointer |
97 | | - using nixlBasicDesc::nixlBasicDesc; |
| 94 | + // Reuse parent constructor without the metadata pointer |
| 95 | + using nixlBasicDesc::nixlBasicDesc; |
98 | 96 |
|
99 | | - nixlMetaDesc() : nixlBasicDesc() { metadataP = nullptr; } |
| 97 | + nixlMetaDesc() : nixlBasicDesc() { |
| 98 | + metadataP = nullptr; |
| 99 | + } |
100 | 100 |
|
101 | | - // No serializer or deserializer, using parent not to expose the metadata |
| 101 | + // No serializer or deserializer, using parent not to expose the metadata |
102 | 102 |
|
103 | | - inline friend bool operator==(const nixlMetaDesc &lhs, const nixlMetaDesc &rhs) { |
104 | | - return (((nixlBasicDesc)lhs == (nixlBasicDesc)rhs) && |
105 | | - (lhs.metadataP == rhs.metadataP)); |
106 | | - } |
| 103 | + inline friend bool |
| 104 | + operator==(const nixlMetaDesc &lhs, const nixlMetaDesc &rhs) { |
| 105 | + return (((nixlBasicDesc)lhs == (nixlBasicDesc)rhs) && (lhs.metadataP == rhs.metadataP)); |
| 106 | + } |
107 | 107 |
|
108 | | - inline void print(const std::string &suffix) const { |
109 | | - nixlBasicDesc::print(", Backend ptr val: " + |
110 | | - std::to_string((uintptr_t)metadataP) + suffix); |
111 | | - } |
| 108 | + inline void |
| 109 | + print(const std::string &suffix) const { |
| 110 | + nixlBasicDesc::print(", Backend ptr val: " + std::to_string((uintptr_t)metadataP) + suffix); |
| 111 | + } |
112 | 112 | }; |
113 | 113 |
|
114 | 114 | typedef nixlDescList<nixlMetaDesc> nixl_meta_dlist_t; |
|
0 commit comments