Application for retrieving SMSs

Hey, I want to write an application that retrieve SMSs from a mobile phone (search criteria should always be supported). Any tips how to start? How the mobile should be connected to the PC? via USB or Bluetooth? How to access SMSs on the mobile phone? Thanks.