# 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

You should have received a copy of the GNU General Public License
along with NFI.  If not, see <http://www.gnu.org/licenses/>.
'''

class com_viber_voip(IApp):
    name = "com.viber.voip"
    cname = "Android Viber Voip"
    databases = {
        "webviewCookiesChromium.db": [
            KnownTable("cookies", None,
                {"creation_utc":ConvertUtils.WebkitToUnix, 
                 "expires_utc":ConvertUtils.WebkitToUnix, 
                 "last_access_utc":ConvertUtils.WebkitToUnix },
                {"creation_utc":DataTypes.DATE, 
                 "expires_utc":DataTypes.DATE, 
                 "last_access_utc":DataTypes.DATE })
        ],
	    "viber_messages": [
            KnownTable("conversations", None,
                {"smart_event_date":ConvertUtils.JsToUnix, 
                 "date":ConvertUtils.JsToUnix },
                {"smart_event_date":DataTypes.DATE, 
                 "date":DataTypes.DATE }),
            KnownTable("messages", None,
                {"date":ConvertUtils.JsToUnix, 
                 "date_real":ConvertUtils.JsToUnix },
                {"date":DataTypes.DATE, "date_real":DataTypes.DATE }),
            KnownTable("messages_calls", None,
                {"date":ConvertUtils.JsToUnix },

# 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/com_viber_voip.py
from IApp import IApp, KnownTable, DataTypes
import ConvertUtils


You should have received a copy of the GNU General Public License
along with NFI.  If not, see <http://www.gnu.org/licenses/>.
'''

class com_viber_voip(IApp):
    name = "com.viber.voip"
    cname = "Android Viber Voip"
    databases = {
        "webviewCookiesChromium.db": [
            KnownTable("cookies", None,
                {"creation_utc":ConvertUtils.WebkitToUnix, 
                 "expires_utc":ConvertUtils.WebkitToUnix, 
                 "last_access_utc":ConvertUtils.WebkitToUnix },
                {"creation_utc":DataTypes.DATE, 
                 "expires_utc":DataTypes.DATE, 
                 "last_access_utc":DataTypes.DATE })
        ],
	    "viber_messages": [
            KnownTable("conversations", None,
                {"smart_event_date":ConvertUtils.JsToUnix, 
                 "date":ConvertUtils.JsToUnix },
                {"smart_event_date":DataTypes.DATE, 
                 "date":DataTypes.DATE }),
            KnownTable("messages", None,
                {"date":ConvertUtils.JsToUnix, 
                 "date_real":ConvertUtils.JsToUnix },
                {"date":DataTypes.DATE, "date_real":DataTypes.DATE }),
            KnownTable("messages_calls", None,
                {"date":ConvertUtils.JsToUnix },

                {"date":DataTypes.DATE }),