1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 #include "MorkParser.hxx"
6 bool openAddressBook(const std::string
& path
)
9 // Open and parse mork file
14 const int defaultScope
= 0x80;
15 MorkTableMap::Map::const_iterator tableIter
;
16 MorkTableMap
*Tables
= mork
.getTables( defaultScope
);
20 for ( tableIter
= Tables
->map
.begin(); tableIter
!= Tables
->map
.end(); ++tableIter
)
22 if ( 0 == tableIter
->first
) continue;
23 SAL_INFO("connectivity.mork", "table->first : " << tableIter
->first
);
24 std::string column
= mork
.getColumn( tableIter
->first
);
25 std::string value
= mork
.getValue( tableIter
->first
);
26 SAL_INFO("connectivity.mork", "table.column : " << column
);
27 SAL_INFO("connectivity.mork", "table.value : " << value
);
36 int main(int argc
, char* argv
[])
40 std::cerr
<< "Usage: " << argv
[0] << " <path-to>/abook.mab" << std::endl
;
41 std::cerr
<< "Example: " << argv
[0] << " /home/johndoe/.thunderbird/m0tpqlky.default/abook.mab" << std::endl
;
46 OString
aOString(argv
[1]);
47 SAL_INFO("connectivity.mork", "abook.mab: " << aOString
);
48 openAddressBook(aOString
.getStr());
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */