1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 #include "MorkParser.hxx"
7 static bool openAddressBook(const std::string
& path
)
10 // Open and parse mork file
16 const int defaultScope
= 0x80;
17 MorkTableMap
*Tables
= mork
.getTables( defaultScope
);
21 for (auto const& table
: Tables
->map
)
23 if ( 0 == table
.first
) continue;
24 SAL_INFO("connectivity.mork", "table->first : " << table
.first
);
25 std::string column
= mork
.getColumn( table
.first
);
26 std::string value
= mork
.getValue( table
.first
);
27 SAL_INFO("connectivity.mork", "table.column : " << column
);
28 SAL_INFO("connectivity.mork", "table.value : " << value
);
37 int main(int argc
, char* argv
[])
41 std::cerr
<< "Usage: " << argv
[0] << " <path-to>/abook.mab" << std::endl
;
42 std::cerr
<< "Example: " << argv
[0] << " /home/johndoe/.thunderbird/m0tpqlky.default/abook.mab" << std::endl
;
47 OString
aOString(argv
[1]);
48 SAL_INFO("connectivity.mork", "abook.mab: " << aOString
);
49 openAddressBook(aOString
.getStr());
54 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */