Skip to content

Commit 92c4c02

Browse files
committed
exch: rename msgchg_grouping terminology (3)
Substitute group -> index. References: GXL-624
1 parent d1ceae7 commit 92c4c02

File tree

10 files changed

+75
-68
lines changed

10 files changed

+75
-68
lines changed

data/msgchg_1.txt

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
index:0
1+
group:0
22
0x0E070003
33
0x65E20102
44
0x3FFB0102
55
0x3FFA001F
66
0x67090040
77

8-
index:1
8+
group:1
99
0x0002000B
1010
0x00390040
1111
0x30070040
@@ -31,7 +31,7 @@ index:1
3131
0x3F880014
3232
0x0E960102
3333

34-
index:2
34+
group:2
3535
0x10960003
3636
0x10900003
3737
0x10950003
@@ -58,38 +58,38 @@ LID=33026,TYPE=0x0005
5858
LID=33039,TYPE=0x0040
5959
LID=33052,TYPE=0x000B
6060

61-
index:3
61+
group:3
6262
0x0023000B
6363
0x00170003
6464
0x00260003
6565
0x00360003
6666
GUID=00062008-0000-0000-c000-000000000046,LID=34179,TYPE=0x001F
6767
LID=34064,TYPE=0x0003
6868

69-
index:4
69+
group:4
7070
0x10130102
7171
0x1013001F
7272
0x1000001F
7373
0x10160003
7474
0x10090102
7575
0x0E1F000B
7676

77-
index:5
77+
group:5
7878
0x0E12000D
7979
GUID=00062002-0000-0000-c000-000000000046,LID=33336,TYPE=0x001F
8080
LID=33373,TYPE=0x0102
8181
LID=33340,TYPE=0x001F
8282
LID=33339,TYPE=0x001F
8383

84-
index:6
84+
group:6
8585
0x0E13000D
8686

87-
index:7
87+
group:7
8888
GUID=00062008-0000-0000-c000-000000000046,LID=34144,TYPE=0x0040
8989
LID=34051,TYPE=0x000B
9090
LID=34050,TYPE=0x0040
9191

92-
index:8
92+
group:8
9393
0x0F030102
9494
0x30130102
9595
0x00710102
@@ -106,7 +106,7 @@ index:8
106106
0x0037001F
107107
0x003D001F
108108

109-
index:9
109+
group:9
110110
0x3A2E001F
111111
0x3A1B001F
112112
0x3A24001F
@@ -168,33 +168,33 @@ LID=32814,TYPE=0x001F
168168
LID=32812,TYPE=0x001F
169169
LID=32813,TYPE=0x001F
170170

171-
index:10
171+
group:10
172172
GUID=00062008-0000-0000-c000-000000000046,LID=34182,TYPE=0x001F
173173
LID=34096,TYPE=0x001F
174174
LID=34189,TYPE=0x001F
175175

176-
index:11
176+
group:11
177177
GUID=00020329-0000-0000-c000-000000000046,NAME=DRMServerLicenseCompressed,TYPE=0x0102
178178

179-
index:12
179+
group:12
180180
GUID=00062002-0000-0000-c000-000000000046,LID=33283,TYPE=0x0003
181181
LID=33282,TYPE=0x0040
182182
LID=33281,TYPE=0x0003
183183
LID=33284,TYPE=0x0003
184184
LID=33321,TYPE=0x000B
185185
GUID=6ed8da90-450b-101b-98da-00aa003f1305,LID=26,TYPE=0x0040
186186

187-
index:13
187+
group:13
188188
0x0C17000B
189189
0x0063000B
190190

191-
index:14
191+
group:14
192192
GUID=00062002-0000-0000-c000-000000000046,LID=33328,TYPE=0x001F
193193
LID=33312,TYPE=0x0040
194194
GUID=6ed8da90-450b-101b-98da-00aa003f1305,LID=1,TYPE=0x0040
195195
GUID=00062002-0000-0000-c000-000000000046,LID=33304,TYPE=0x0003
196196

197-
index:15
197+
group:15
198198
GUID=00062002-0000-0000-c000-000000000046,LID=33299,TYPE=0x0003
199199
LID=33294,TYPE=0x0040
200200
LID=33293,TYPE=0x0040
@@ -206,46 +206,46 @@ LID=33315,TYPE=0x000B
206206
LID=33329,TYPE=0x0003
207207
GUID=6ed8da90-450b-101b-98da-00aa003f1305,LID=34,TYPE=0x001F
208208

209-
index:16
209+
group:16
210210
GUID=00062008-0000-0000-c000-000000000046,LID=33325,TYPE=0x0040
211211
LID=33324,TYPE=0x0003
212212

213-
index:17
213+
group:17
214214
GUID=00062002-0000-0000-c000-000000000046,LID=33302,TYPE=0x0102
215215

216-
index:18
216+
group:18
217217
GUID=00062002-0000-0000-c000-000000000046,LID=33288,TYPE=0x001F
218218
GUID=6ed8da90-450b-101b-98da-00aa003f1305,LID=40,TYPE=0x001F
219219
LID=2,TYPE=0x001F
220220

221-
index:19
221+
group:19
222222
GUID=00062002-0000-0000-c000-000000000046,LID=33287,TYPE=0x0003
223223
LID=33303,TYPE=0x0003
224224
LID=33285,TYPE=0x0003
225225
LID=33316,TYPE=0x0003
226226
LID=33326,TYPE=0x001F
227227

228-
index:20
228+
group:20
229229
GUID=6ed8da90-450b-101b-98da-00aa003f1305,LID=12,TYPE=0x0003
230230
GUID=00062002-0000-0000-c000-000000000046,LID=33332,TYPE=0x001F
231231
LID=33331,TYPE=0x0102
232232

233-
index:21
233+
group:21
234234
0x30180102
235235
0x30190102
236236

237-
index:22
237+
group:22
238238
0x301F0040
239239
0x301E0003
240240
0x301C0040
241241
0x301D0003
242242
0x301A0003
243243
0x301B0102
244244

245-
index:23
245+
group:23
246246
0x30140102
247247

248-
index:24
248+
group:24
249249
GUID=11000e07-b51b-40d6-af21-caa85edab1d0,LID=6,TYPE=0x001F
250250
LID=5,TYPE=0x0102
251251
LID=14,TYPE=0x001F

exch/emsmdb/common_util.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,6 @@ void common_util_notify_receipt(const char *username, int type,
14301430
BOOL common_util_save_message_ics(logon_object *plogon,
14311431
uint64_t message_id, PROPTAG_ARRAY *pchanged_proptags) try
14321432
{
1433-
uint32_t tmp_index;
14341433
uint64_t change_num;
14351434
PROBLEM_ARRAY tmp_problems;
14361435
auto dir = plogon->get_dir();
@@ -1465,22 +1464,25 @@ BOOL common_util_save_message_ics(logon_object *plogon,
14651464

14661465
std::vector<uint32_t> groups;
14671466
std::vector<proptag_t> ugrp_tags;
1468-
if (pgpinfo->get_partial_index(PR_CHANGE_KEY, &tmp_index)) {
1469-
if (!contains(groups, tmp_index))
1470-
groups.emplace_back(tmp_index);
1467+
uint32_t le_grp = 0;
1468+
if (pgpinfo->get_group(PR_CHANGE_KEY, &le_grp)) {
1469+
if (!contains(groups, le_grp))
1470+
groups.emplace_back(le_grp);
14711471
} else {
14721472
if (!contains(ugrp_tags, PR_CHANGE_KEY))
14731473
ugrp_tags.emplace_back(PR_CHANGE_KEY);
14741474
}
14751475
if (pchanged_proptags != nullptr) {
1476-
for (const auto tag : *pchanged_proptags)
1477-
if (pgpinfo->get_partial_index(tag, &tmp_index)) {
1478-
if (!contains(groups, tmp_index))
1479-
groups.emplace_back(tmp_index);
1476+
for (const auto tag : *pchanged_proptags) {
1477+
uint32_t le_grp = 0;
1478+
if (pgpinfo->get_group(tag, &le_grp)) {
1479+
if (!contains(groups, le_grp))
1480+
groups.emplace_back(le_grp);
14801481
} else {
14811482
if (!contains(ugrp_tags, tag))
14821483
ugrp_tags.emplace_back(tag);
14831484
}
1485+
}
14841486
}
14851487
return exmdb_client->save_change_pgrp(dir, message_id,
14861488
change_num, groups, ugrp_tags);

exch/emsmdb/ftstream_producer.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,18 +675,24 @@ BOOL fxstream_producer::write_messagechangepartial(
675675

676676
if (!ftstream_producer_write_groupinfo(pstream, pmsg->pgpinfo))
677677
return FALSE;
678+
/*
679+
* OXCFXICS itself confuses the terms heavily, calling this meta tag
680+
* "GroupId" (cf. §2.2.4.1.5.4), right in the next subclause saying
681+
* it is the *PGM* ID not the group id.
682+
*/
678683
if (!write_uint32(MetaTagIncrSyncGroupId))
679684
return FALSE;
680685
if (!write_uint32(pmsg->map_id))
681686
return FALSE;
687+
682688
if (!write_uint32(INCRSYNCCHGPARTIAL))
683689
return FALSE;
684690
if (!ftstream_producer_write_messagechangeheader(pstream, pchgheader))
685691
return FALSE;
686692
for (size_t i = 0; i < pmsg->count; ++i) {
687693
if (!write_uint32(MetaTagIncrementalSyncMessagePartial))
688694
return FALSE;
689-
if (!write_uint32(pmsg->pchanges[i].index))
695+
if (!write_uint32(pmsg->pchanges[i].group))
690696
return FALSE;
691697
for (const auto &ipv : pmsg->pchanges[i].proplist) {
692698
switch (ipv.proptag) {

exch/emsmdb/icsdownctx_object.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,6 @@ static BOOL icsdownctx_object_get_changepartial(icsdownctx_object *pctx,
616616
MESSAGE_CONTENT *pmsgctnt, uint32_t map_id, const std::vector<uint32_t> &group_list,
617617
const std::vector<proptag_t> &ugrp_tags, MSGCHG_PARTIAL *pmsg)
618618
{
619-
uint32_t index;
620619
PROPTAG_ARRAY *pchangetags;
621620
static constexpr BINARY fake_bin{};
622621

@@ -648,9 +647,9 @@ static BOOL icsdownctx_object_get_changepartial(icsdownctx_object *pctx,
648647

649648
unsigned int i;
650649
for (i = 0; i < group_list.size(); ++i) {
651-
index = group_list[i];
652-
pmsg->pchanges[i].index = index;
653-
pchangetags = pgpinfo->pgroups + index;
650+
auto group_id = group_list[i];
651+
pmsg->pchanges[i].group = group_id;
652+
pchangetags = &pgpinfo->pgroups[group_id];
654653
auto &pl = pmsg->pchanges[i].proplist;
655654
pl.ppropval = cu_alloc<TAGGED_PROPVAL>(pchangetags->count);
656655
unsigned int count = 0;
@@ -682,7 +681,7 @@ static BOOL icsdownctx_object_get_changepartial(icsdownctx_object *pctx,
682681
if (ugrp_tags.empty())
683682
return TRUE;
684683
auto &pl = pmsg->pchanges[i].proplist;
685-
pmsg->pchanges[i].index = UINT32_MAX;
684+
pmsg->pchanges[i].group = UINT32_MAX;
686685
pl.ppropval = cu_alloc<TAGGED_PROPVAL>(ugrp_tags.size());
687686
unsigned int count = 0;
688687
for (const auto proptag : ugrp_tags) {

exch/emsmdb/message_object.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ ec_error_t message_object::save() try
335335
auto pmessage = this;
336336
uint32_t result;
337337
BINARY *pbin_pcl = nullptr;
338-
uint32_t tmp_index;
339338

340339
if (!pmessage->b_new && !pmessage->b_touched)
341340
return ecSuccess;
@@ -472,19 +471,21 @@ ec_error_t message_object::save() try
472471
if (!proptag_array_append(pmessage->pchanged_proptags, PR_MESSAGE_FLAGS))
473472
return ecRpcFailed;
474473
for (const auto tag : *pmessage->pchanged_proptags) {
475-
if (pgpinfo->get_partial_index(tag, &tmp_index)) {
476-
if (!contains(groups, tmp_index))
477-
groups.emplace_back(tmp_index);
474+
uint32_t le_grp = 0;
475+
if (pgpinfo->get_group(tag, &le_grp)) {
476+
if (!contains(groups, le_grp))
477+
groups.emplace_back(le_grp);
478478
} else {
479479
if (!contains(ugrp_tags, tag))
480480
ugrp_tags.emplace_back(tag);
481481
}
482482
}
483483
for (const auto tag : *pmessage->premoved_proptags) {
484-
if (!pgpinfo->get_partial_index(tag, &tmp_index))
484+
uint32_t le_grp = 0;
485+
if (!pgpinfo->get_group(tag, &le_grp))
485486
goto SAVE_FULL_CHANGE;
486-
if (!contains(groups, tmp_index))
487-
groups.emplace_back(tmp_index);
487+
if (!contains(groups, le_grp))
488+
groups.emplace_back(le_grp);
488489
}
489490
if (!exmdb_client->save_change_pgrp(dir, pmessage->message_id,
490491
pmessage->change_num, groups, ugrp_tags))

exch/exmdb/message.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ BOOL exmdb_server::set_pgm_id(const char *dir, uint64_t message_id, uint32_t map
11411141
return TRUE;
11421142
}
11431143

1144-
/* if count of indices and ungroup_proptags are both 0 means full change */
1144+
/* if groups.size() and ungroup_proptags are both 0, it means full change */
11451145
BOOL exmdb_server::save_change_pgrp(const char *dir, uint64_t message_id,
11461146
uint64_t cn, const std::vector<uint32_t> &groups,
11471147
const std::vector<proptag_t> &ugrp_tags) try
@@ -1186,7 +1186,7 @@ BOOL exmdb_server::save_change_pgrp(const char *dir, uint64_t message_id,
11861186
return false;
11871187
}
11881188

1189-
/* if count of indices and ungroup_proptags are both 0 means full change */
1189+
/* if groups.size() and ungroup_proptags are both 0, it means full change */
11901190
BOOL exmdb_server::get_change_pgrp(const char *dir, uint64_t message_id,
11911191
uint64_t cn, std::vector<uint32_t> *groups,
11921192
std::vector<gromox::proptag_t> *ugrp_tags)

exch/zcore/message_object.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -377,22 +377,22 @@ ec_error_t message_object::save() try
377377
return ecError;
378378
for (unsigned int i = 0; i < pmessage->pchanged_proptags->count; ++i) {
379379
const auto tag = pmessage->pchanged_proptags->pproptag[i];
380-
uint32_t tmp_index = 0;
381-
if (pgpinfo->get_partial_index(tag, &tmp_index)) {
382-
if (!contains(groups, tmp_index))
383-
groups.emplace_back(tmp_index);
380+
uint32_t le_grp = 0;
381+
if (pgpinfo->get_group(tag, &le_grp)) {
382+
if (!contains(groups, le_grp))
383+
groups.emplace_back(le_grp);
384384
} else {
385385
if (!contains(ugrp_tags, tag))
386386
ugrp_tags.emplace_back(tag);
387387
}
388388
}
389389
for (unsigned int i = 0; i < pmessage->premoved_proptags->count; ++i) {
390390
const auto tag = pmessage->premoved_proptags->pproptag[i];
391-
uint32_t tmp_index = 0;
392-
if (!pgpinfo->get_partial_index(tag, &tmp_index))
391+
uint32_t le_grp = 0;
392+
if (!pgpinfo->get_group(tag, &le_grp))
393393
goto SAVE_FULL_CHANGE;
394-
if (!contains(groups, tmp_index))
395-
groups.emplace_back(tmp_index);
394+
if (!contains(groups, le_grp))
395+
groups.emplace_back(le_grp);
396396
}
397397
if (!exmdb_client->save_change_pgrp(dir, pmessage->message_id,
398398
pmessage->change_num, groups, ugrp_tags))

include/gromox/element_data.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct GX_EXPORT property_groupinfo {
1414
property_groupinfo(property_groupinfo &&) noexcept;
1515
void operator=(property_groupinfo &&) noexcept = delete;
1616
bool append_internal(PROPTAG_ARRAY *);
17-
bool get_partial_index(gromox::proptag_t, uint32_t *idx) const;
17+
bool get_group(gromox::proptag_t, uint32_t *grp) const;
1818

1919
uint32_t map_id = 0, reserved = 0, count = 0;
2020
PROPTAG_ARRAY *pgroups = nullptr;
@@ -40,7 +40,7 @@ struct GX_EXPORT MESSAGE_CHILDREN {
4040
};
4141

4242
struct GX_EXPORT CHANGE_PART {
43-
uint32_t index;
43+
uint32_t group;
4444
TPROPVAL_ARRAY proplist;
4545
};
4646

lib/mapi/element_data.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -333,14 +333,13 @@ bool property_groupinfo::append_internal(PROPTAG_ARRAY *pgroup)
333333
return TRUE;
334334
}
335335

336-
bool property_groupinfo::get_partial_index(proptag_t proptag,
337-
uint32_t *pindex) const
336+
bool property_groupinfo::get_group(proptag_t proptag, uint32_t *grp) const
338337
{
339338
auto pgpinfo = this;
340339
for (size_t i = 0; i < pgpinfo->count; ++i)
341340
for (size_t j = 0; j < pgpinfo->pgroups[i].count; ++j)
342341
if (proptag == pgpinfo->pgroups[i].pproptag[j]) {
343-
*pindex = i;
342+
*grp = i;
344343
return true;
345344
}
346345
return false;

0 commit comments

Comments
 (0)