# Path: IApp.py
# class IApp(object):
#     '''
#     classdocs
#     '''
#     name = "Unknown"
#     cname = "Unknown"
#     databases = {}
#     known = False
#     dummyRE = type(re.compile("nfi"))
#     version = [-1]
#     
#     def get_versions(self):
#         return self.version
#     
#     def has_defaultversion(self):
#         if IDeviceVersion.DEFAULT_VERSION in self.version:
#             return True
#         return False
#     
#     def has_version(self,appversion):
#         if appversion in self.version:
#             return True
#         return False
#     
#     def get_packagename(self):
#         return self.name
#     
#     def get_canonicalname(self):
#         return self.cname
#     
#     def get_files(self):
#         return self.databases
#     
#     def get_file_info(self, dbname):
#         if len(self.databases) == 0:
#             return None
#         for thisdbname,defn in self.databases.iteritems():
#             if type(thisdbname) == type("str"):
#                 if thisdbname == dbname:
#                     return defn
#             elif type(thisdbname) == self.dummyRE:
#                 if thisdbname.match(dbname) != None:
#                     return defn
#         return None
#     
#     def set_packagename(self, name):
#         self.name = name
#     
#     def __init__(self):
#         return
# 
# class KnownTable(object):
#     name = None
#     sql = None
#     converter = None
#     knownfields = None
#     def __init__(self, table_name, parse_sql, converter=None, knownfields=None ):
#         self.name = table_name
#         self.sql = parse_sql
#         self.converter = converter
#         self.knownfields = knownfields
# 
# class DataTypes(object):
#     EMPTY = 0
#     DATA = 1
#     TEXT = 2
#     DATE = 3


from IApp import IApp, KnownTable, DataTypes
import ConvertUtils
                    {"timeCreated":ConvertUtils.JsToUnix, 
		     "timeLastUsed":ConvertUtils.JsToUnix,
		     "timePasswordChanged":ConvertUtils.JsToUnix },
                    {"timeCreated": DataTypes.DATE, 
		     "timeLastUsed":DataTypes.DATE,
		     "timePasswordChanged":DataTypes.DATE }),
            ],
            "downloads.sqlite": [         
                KnownTable("moz_downloads", None, 
                    {"startTime":ConvertUtils.JsToUnix,"endTime":ConvertUtils.JsToUnix },
                    {"endTime":DataTypes.DATE, "endTime":DataTypes.DATE })
            ],
            "browser.db": [         
                KnownTable("bookmarks", None, 
                    {"created":ConvertUtils.JsToUnix, "modified":ConvertUtils.JsToUnix, "deleted":ConvertUtils.JsToUnix },
                    {"created":DataTypes.DATE, "modified":DataTypes.DATE, "deleted":DataTypes.DATE }),
		KnownTable("favicons", None, 
                    {"created":ConvertUtils.JsToUnix, "modified":ConvertUtils.JsToUnix },
                    {"created":DataTypes.DATE, "modified":DataTypes.DATE }),
		KnownTable("history", None, 
                    {"date":ConvertUtils.JsToUnix, "created":ConvertUtils.JsToUnix, "modified":ConvertUtils.JsToUnix,"deleted":ConvertUtils.JsToUnix },
                    {"date":DataTypes.DATE, "created":DataTypes.DATE, "modified":DataTypes.DATE, "deleted":DataTypes.DATE }),
		KnownTable("reading_list", None, 
                    {"read":ConvertUtils.JsToUnix, "deleted":ConvertUtils.JsToUnix, "modified":ConvertUtils.JsToUnix,"created":ConvertUtils.JsToUnix },
                    {"read":DataTypes.DATE, "deleted":DataTypes.DATE, "modified":DataTypes.DATE, "created":DataTypes.DATE })
            ],
            "health.db": [         
                KnownTable("android_metadata", None, 
                    {"platformVersion":ConvertUtils.JsToUnix, "platformBuildID":ConvertUtils.JsToUnix },
                    {"platformVersion":DataTypes.DATE, "platformBuildID":DataTypes.DATE }),

# Path: IApp.py
# class IApp(object):
#     '''
#     classdocs
#     '''
#     name = "Unknown"
#     cname = "Unknown"
#     databases = {}
#     known = False
#     dummyRE = type(re.compile("nfi"))
#     version = [-1]
#     
#     def get_versions(self):
#         return self.version
#     
#     def has_defaultversion(self):
#         if IDeviceVersion.DEFAULT_VERSION in self.version:
#             return True
#         return False
#     
#     def has_version(self,appversion):
#         if appversion in self.version:
#             return True
#         return False
#     
#     def get_packagename(self):
#         return self.name
#     
#     def get_canonicalname(self):
#         return self.cname
#     
#     def get_files(self):
#         return self.databases
#     
#     def get_file_info(self, dbname):
#         if len(self.databases) == 0:
#             return None
#         for thisdbname,defn in self.databases.iteritems():
#             if type(thisdbname) == type("str"):
#                 if thisdbname == dbname:
#                     return defn
#             elif type(thisdbname) == self.dummyRE:
#                 if thisdbname.match(dbname) != None:
#                     return defn
#         return None
#     
#     def set_packagename(self, name):
#         self.name = name
#     
#     def __init__(self):
#         return
# 
# class KnownTable(object):
#     name = None
#     sql = None
#     converter = None
#     knownfields = None
#     def __init__(self, table_name, parse_sql, converter=None, knownfields=None ):
#         self.name = table_name
#         self.sql = parse_sql
#         self.converter = converter
#         self.knownfields = knownfields
# 
# class DataTypes(object):
#     EMPTY = 0
#     DATA = 1
#     TEXT = 2
#     DATE = 3


# Path: AndroidApps/org_mozilla_firefox.py
from IApp import IApp, KnownTable, DataTypes
import ConvertUtils

                    {"timeCreated":ConvertUtils.JsToUnix, 
		     "timeLastUsed":ConvertUtils.JsToUnix,
		     "timePasswordChanged":ConvertUtils.JsToUnix },
                    {"timeCreated": DataTypes.DATE, 
		     "timeLastUsed":DataTypes.DATE,
		     "timePasswordChanged":DataTypes.DATE }),
            ],
            "downloads.sqlite": [         
                KnownTable("moz_downloads", None, 
                    {"startTime":ConvertUtils.JsToUnix,"endTime":ConvertUtils.JsToUnix },
                    {"endTime":DataTypes.DATE, "endTime":DataTypes.DATE })
            ],
            "browser.db": [         
                KnownTable("bookmarks", None, 
                    {"created":ConvertUtils.JsToUnix, "modified":ConvertUtils.JsToUnix, "deleted":ConvertUtils.JsToUnix },
                    {"created":DataTypes.DATE, "modified":DataTypes.DATE, "deleted":DataTypes.DATE }),
		KnownTable("favicons", None, 
                    {"created":ConvertUtils.JsToUnix, "modified":ConvertUtils.JsToUnix },
                    {"created":DataTypes.DATE, "modified":DataTypes.DATE }),
		KnownTable("history", None, 
                    {"date":ConvertUtils.JsToUnix, "created":ConvertUtils.JsToUnix, "modified":ConvertUtils.JsToUnix,"deleted":ConvertUtils.JsToUnix },
                    {"date":DataTypes.DATE, "created":DataTypes.DATE, "modified":DataTypes.DATE, "deleted":DataTypes.DATE }),
		KnownTable("reading_list", None, 
                    {"read":ConvertUtils.JsToUnix, "deleted":ConvertUtils.JsToUnix, "modified":ConvertUtils.JsToUnix,"created":ConvertUtils.JsToUnix },
                    {"read":DataTypes.DATE, "deleted":DataTypes.DATE, "modified":DataTypes.DATE, "created":DataTypes.DATE })
            ],
            "health.db": [         
                KnownTable("android_metadata", None, 
                    {"platformVersion":ConvertUtils.JsToUnix, "platformBuildID":ConvertUtils.JsToUnix },
                    {"platformVersion":DataTypes.DATE, "platformBuildID":DataTypes.DATE }),

		KnownTable("environments", None, 