src: Making use of DEPRECATED macro and updating library code not to use deprecated methods

Change-Id: Ibe17977e7fcbb759a26dbe1cfa3d472598e49bcc